In reply to Alokpati:
HI,
Yes you are right.,
but we can do like below.,
function void post_randomize();
int i=$urandom_range(0,8);
array[i]=array[i+1];
endfunction
though itseems everytime alternate index will be having same values,that’s fine as the main context is to have same value in any two different indexes.