In reply to Manikanta Kopparapu:
You can add a state variable that increments each time you call randomize
class unique_array_example;
rand bit [7:0] array_1[];
int offset;
constraint addr_size{array_1.size()==5;}
constraint addr_unique_values{
foreach(array_1[i]) array_1[i]==(offset+i*2);}
function void post_randomize();
offset++;
endfunction
endclass:unique_array_example
Again, this series of numbers is not random; it make little sense to do it this way except if this were a homework/interview question.