Generate indices for a rectangular mesh using ucount/vcount