First of all: Most modern languages will simply throw an index out of bounds exception. This is a good thing.
Now: A[4][9][3][2] has a problem in the middle two indices. We need to start with the first:
- A[4][9] is A[4+(9/7)][9%7] which is A[5][2]
- So A[4][9][3] is A[5][2][3] is A[5][2+3/3][3%3] which is A[5][3][0]
- This makes A[4][9][3][2] map to A[5][3][0][2]
To understand, why throwing is a good idea, think of A[7][8][4][5].