Generate unique elements in an array

In reply to ssingh:

‘data’ does not need to be declared as rand. pre_randomize() is called when you call randomize() on that object regardless of it having any rand variables. If the object being randomized contains a class variable referencing another class object, that class variable must be declared rand to call the pre_randomize() method of the other class.