Minimalist C++ multidimensional array implementation