Randc does not work with 2d array

In reply to UVM_LOVE:

There are several problems with your code.

You call randomize() inside the for-loop displaying the array. That means randomize() gets called many times before some elements are displayed. Call randomize() once before trying to display.

For displaying, the size of the array dimension could be less than three elements. Use a foreach-loop instead.

And resizing a dynamic array as part of randomizing destroys the previous array and reconstructs a new one. That reconstruction also destroys the random cycle states.

You probably need to come up with a practical use case for want you are trying to code.