you can also do like this.
setarray .headgear0_0[0],5210,2254,10,7063,50,7168,200,7038,200,10000000;
setarray .headgear0_1[0],5254,5132,1,5068,1,2255,1,7023,5,983,1,10000000;
.@x = .@y = 0;
.@size = getarraysize( getd( ".headgear"+.@x+"_"+.@y ) )
// copy to a temporary array
copyarray .@temp_array,getd( ".headgear"+.@x+"_"+.@y ),.@size;
// check value
for( .@i = 0; .@i < .@size; .@i++ )
mes ".headgear"+.@x+"_"+.@y+"["+.@i+"] = "+.@temp_array[.@i];
close;
way better than having a nested for-loop