but why not simply do your array like this ?
save the value into 1 array ?
setarray $@Box,<value>,<value>,<value>;
then you can simply write a loop process for it...
for( set .@i,0; .@i < getarraysize( $@Box ); set .@i,.@i + 1 )
attachrid $@Box[.@i];