in reply to Multi-dimensional arrays...
When you are dealing with "many dimensional arrays," sometimes a better way to visualize it, and to implement it, is by a general container-class having a list (an "n-tuple") as its key ... This can be obtained readily, and it can make your code much easier to build and to maintain.