Return a list of (index, value) pairs for every element of the 2-D array Z,
in row-major order, where index is a (row, col) tuple and value is an int.
Input
[[0 1 2]
[3 4 5]
[6 7 8]]
Output
[((0, 0), 0), ((0, 1), 1), ((0, 2), 2), ((1, 0), 3), ((1, 1), 4), ((1, 2), 5), ((2, 0), 6), ((2, 1), 7), ((2, 2), 8)]