Constraint involving queues and arrays

In reply to dave_59:

Based on Random_Variables_as_index , isn’t the following Syntax Illegal as per LRM ?? ::


  q[i] == array[idx[i]] ;  

Is there an alternate solution ( without post_randomize() ) ??