Constraint for array

Can we just pick two random numbers in [0:2],
and in post randomized method set


constraint c_limit {
  num1 inside [0:2];
  num2 inside [0:2];
  foreach (arrary[i, j]) arrary[i][j] < MAX;
};

function void post_randomzise();
  array[num1][num2] = MAX;
endfunction

Not arguing, but debating pros and cons of this solution.