I'll probably get some of this wrong, but I read up on these arguments back when Piketty was in the news w/ his book:
Yes, it can go on forever -- the rates of retun in the stock market are based, theoretically, on the changing expectations about the future and not based on current income.
Thought experment: 100 of us live in small society producing widgets, we each make a widget a day at the factory. GDP is 36500 widgets/day. We also spend some time researching a way to make widgets faster. Yesterday we found a breakthrough that made it 50% likely that in 5 years we'll each be making 10 widgets a day.
It would be reasonable for the valuation of our widget company to go up something like 40% on that news, right? But GDP next year is stlil going to be 36500 widgets/day.
Since the stock market bakes in all optimistic expectations, then in the eras it that it outpaces GDP it could be the case that there remains unrealized optimism for the future.
If the question is "but where is the capital coming from that flows into the stock market?" The answer is that it can be created via credit, or it could be created via appreciation in assets not captured in the stock market (like housing, the major one).