An investment bank could easily find multiple cash buyers for companies of that size who would be willing to pay a premium. They’re like real estate brokers for companies.
As an example, IBM paid $34 billion in cash to buy Red Hat last October, which it paid to Red Hats shareholders. Red Hat was worth $21 billion at the time.
In practice many cash purchases of businesses are funded in part by debt. Companies or investors can borrow money from banks, issue bonds to receive cash, and contribute some of their own cash to out find a cash offer for a company.