Generate unique elements in an array

In reply to dave_59:

In reply to mseyunni:
You have declared dcd2pdw as an associative array whose index type is bit[DCD_INDEX_BITS-1:0]. You cannot randomize the size of an associative array. Did you mean to declare a fixed sized array?

rand bit[PDW_INDEX_BITS-1:0] dcd2pdw[DCD_INDEX_BITS-1:0];

Hi Dave, does this mean that an associative array cannot be randomized? If it can be, can we have constraints on elements of the associative array? What happens when a rand object containing an associative array is randomized?