Liquidity is not an all or none thing. Stocks, over a long time, have proven to be very liquid. And the core of their valuation - the ability of a company to create value - is more stable than most other asset classes.
That's not money coming from somewhere; it's the ability to access money. The correct term for this is "solvency", and if you yank out the full actual dollars on hand then the bank (or stock market) becomes "insolvent". It's when you have less money being demanded than is actually there, even if there's much more money on paper than in reality.
There's plenty of other ways money effectively enters the market. Companies pay dividends to investors. They buy back shares. Public companies are bought or liquidated. The reason stocks are worth money is because companies create value; they did that, and were worth money, before there were stock markets. Owning part of a company isn't just trading baseball cards for companies you like, it's owning a productive asset - and that's why companies are largely evaluated by their price/earnings.
Nobody who has any understanding of economics thinks it's a zero sum game.
Except dividends are money from outside being put into the market, increasing the money in the market. Buybacks are money being put into the market from outside the market, to remove stocks from existence. In any of these cases, there is money flowing into the market.
Money flows from an outside source into the market. When an investor puts capital into the market to buy stocks, money comes into the market. When an investor sells those stocks, he has money that he can re-invest. If he decides to not re-invest some of the money, then that money leaves the securities market. If he decides to bring in more capital, he injects more money into the securities market.
The securities market has exactly as much money as has been injected into it minus exactly as much money as has been removed from it; you cannot put $100 in to buy 100 shares of a stock, hit $2/share, sell that for $200, and actually get $200 unless another $100 is brought to the table from outside the stock market.
This is called a zero-sum game. Every stock that's brought in is put there from the outside. Every dollar that's brought in is put there from the outside. The amount of money in the market minus the amount of money that has come from outside the market is zero, and when we all go home we have exactly the same number of dollars that we started with--just divided up differently. That somebody can bring more monopoly money in at any point in the game doesn't change this: money comes from outside, not from within. The market doesn't create money and it doesn't destroy money; it transfers it.