When you want to represent say 6d data you have to account for all sorts of interesting details.
One interesting detail is strides along particular dimensions.
For example given an ndarray of
2 x 3 x 1 x 5
You will have a stride to get to the next element along a dimension in the linear buffer.
The strides along k dimensions are determined by ordering.
The crazy thing here though is that 1 in the middle for the shape.
If you find a 1 in the shape you actually skip that stride when indexing into the array.
Numpy's internals go in to this quite a bit: https://scipy-lectures.github.io/advanced/advanced_numpy/
The great thing about the linear storage of these arrays also helps with distributed systems and reading blocks of bytes.
Lots of interesting little things in here to consider.
Without going ok another tangent this is also highly relates to blas. There is a lot more to this in practice. This is a wonderful introduction to the topic though.