For a 2D grid, use this module, which is adapted from the article "How to create a grid of values"
start ExpandGrid(_x1, _x2);
x1 = colvec(_x1); Nx = nrow(x1);
x2 = rowvec(_x2); Ny = ncol(x2);
X = repeat(x1, 1, Ny);
Y = repeat(x2, Nx);
return ( colvec(X) || colvec(Y) );
finish;