How to randomize 2 dimensional dynamic array in SystemVerilog

In reply to abhirula:

Your example does not make any sense, rows_cols[0][0] can only have a single value. And how do you define ordering?

You can always iterate over a dynamic array using a foreach constraint.

constraint c {foreach (rows_cols[ii,jj]) {
          rows_cols[ii,jj] inside {[100:200]}; // applies to every element
          (jj != 0 ) -> rows_cols[ii,jj-1] < rows_cols[ii,jj];
      }
}