So you want a random number of variables set to a random number from a given array correct, without any repeating values from said given array?
try this
setarray .array_list[0], 1, 2, 3, 4, 5;
set .random_variable, rand( 1,4 );
copyarray .@temp_list[0],.array_list[0],getarraysize( .array_list);
for( set .@a, 0; .@a < .random_variable; set .@a, .@a + 1 ) {
.@i = rand( getarraysize( .@temp_list) )
setd( "Variable_" + .@a ), .@temp_list[ .@i ];
deletearray .@temp_list[.@i],1;
mes .@a + ": " + getd( "Variable_" + .@a ) + "";
}
Edit2: This Should Work