Is there an easier way to do all of this?

Sorry, my arrayDimensionCount was incremented too far :D. That would be a 2d array. Still perhaps some coding examples?