How to create random dynamic 2D arrays in SystemVerilog?

In reply to UVM_LOVE:

1 for packed one and 2 for unpacked ones.