Can the stock market grow faster than GDP indefinitely?
There are trends that has allowed stock markets in advanced economies to grow faster than GDP for a long time:


Branching out abroad. This gives access to faster growing markets in developing countries. This trend will end when all countries are advanced economies.
Fewer private companies. This trend will end when most of GDP is generated by companies listed on the stock market.
Multiple Expansion. Reduced interest rates and increased money supply can reduce returns expectations and increases PE multiples. This trend has worked both ways through time but for the last 10-20 years it has generally acted in an expansive capacity.


In addition, there is a way for the stock market to generate a higher return  without an increase in stock market value:


Dividends. Dividends increase stock market return without increasing its value. Though not really considered growth, dividends are often included when comparing stock market growth with GDP growth.