Arrays help

I have some data in a multidimensional array that represents sets of 3d coordinates that are the eight vertices of a 5x5x5 cube, so;

const byte vertices[8][3]{
 {0,0,0},
 {0,0,5},
 {0,5,5},
 {0,5,0},
 {5,0,0},
 {5,0,5},
 {5,5,5},
 {5,5,0}
}

I need to be able to "move" a pointer to each vertex by a variety of different routes...I wanted to hold the order of the vertices in ANOTHER array as follows

const byte order[2][8]{
 {0,1,2,3,4,5,6,7},
 {7,6,5,4,3,2,1,0}
}

How do I use the values in the "order" array within the parameters of the "vertices" array to call the values in the required order? Is the array idea the best way, or is there a better one?

Thanks!

Array is fine. What you can do is:

unsigned order_idx=0; // define which vertex order you want to use
for(unsigned i=0; i<8; ++i)
{
  const byte *vtx=vertices[order[order_idx][i]];
  // use vtx[0], vtx[1], vtx[2] here for the coordinates and do something with them
}