Support [][] in AUTO_TEMPLATE to better handle multidimensional arrays.

Part of last commit.