Add ability to handle multidimensional arrays