They aren't actual arrays though.
How an actual array would work:
$Variable = [0,5,3];
This would create $Variable as a pointer to an array, and set $Variable.length to 3, $Variable[0] to 0, etc.
$Variable[1] = 6; would then change it to [0,6,3]. Without the array existing, it would create $Variable as a pointer to the array, and set the value(s) accordingly.
This doesn't happen in TS.
When you do $Variable[1] = 6; $Variable is still null. There is no determinable length to it. All you're doing is actually setting $Variable1 = 6;
Example:
%x = 1;
%y = 2;
$Variable[%x,%y] = 1;
This is just doing
$Variable1_2 = 1;
There is no way to tell the engine how many things are in the 'array' when you use a foreach, in TorqueScript.