As C programmers, most of us think of pointer arithmetic for multi-dimensional arrays in a nested way:
The address for a 1-dimensional array is base + x
.
The address for a 2-dimensional array is base + x + y*x_size
for row-major layout and base + y + x*y_size
for column-major layout.
The address for a 3-dimensional array is base + x + (y + z*y_size)*x_size
for row-column-major layout.
And so on.