There's the "Generate 3D point grid" compound that you can look up. It makes a x*y*z sized array + uses modulo in two places to determine the positions.
I find the Divide Integers compound to be helpful too (located inside generate 3d point grid).
That generates number sequences like 0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3