A multi-dimensional array should be able to handle this.

But your general question is still too unclear. I need some context, and I need a more abstract idea or instance of what you're trying to accomplish.