Lightning invoices can leave out the amount field, so it would be possible for a wallet to implement a "pay all" feature that sent every sat possible, taking fees into account.
Similarly, Phoenix (and probably other wallets) has a "Drain wallet" feature that closes all channels and sends all available funds to the specified on-chain address.