"If we use A(:,:) we expect an array with dimensions (X*Y, Z), with the i,j element pointing at (i mod X, i div Y, j) element of A"
No, we don't expect that at all.
In fact the last given index refers to that dimension and also to all infinite trailing dimensions. Your test-case is entirely consistent with that (and this paradigm also informs us that the concept of linear indexing is really just an edge-case of subscript indexing). So a general rule that describes both linear and subscript indexing is actually this:
And yes, it is documented here:
Loren writes: "Indexing with fewer indices than dimensions If the final dimension i<N, the right-hand dimensions collapse into the final dimension. E.g., if A = rand(1,3,4,1,7) and we type A(1,2,12), then we get the element as if A were reshaped to A(1,3,28) and then indexed into. 28 repesents the product of the final size of the final dimension addressed and the other "trailing" ones."
and she then proceeds to give a detailed example. Take a look!
"One would expect that, when one tries to reduce the dimensions of an array using colons, the reduction will be done in the same manner as the accessing."
" Is it possible to determine/change this behavior?"
I doubt that you would convince TMW to redesign this very simple indexing concept into your much more complicated concept that requires MOD and DIVISION and whatnot, but you can certainly try: