in reply to Re^3: n-dim array generator
in thread n-dim array generator

The PDL function ndcoords looks like it does what you need.
pdl> p ndcoords 3,3 [ [ [0 0] [1 0] [2 0] ] [ [0 1] [1 1] [2 1] ] [ [0 2] [1 2] [2 2] ] ]