This is a trivial function, just to show that Module does not recognize the list generated by Table.
f1[x_] := Module[Table[out[i], {i, 1, Length[x]}], 42]
f1[{1, 2, 3}]
In an even more trivial case. It appears that Module is not willing to recognize such indexed variables as symbols:
f2[x_] := Module[{out[1]}, out[1] = x; out[1]]
f2[5]
Module::lvsym: Local variable specification {out[1]} contains out[1], which is not a symbol or an assignment to a symbol
Module[{out[1]}, out[1] = 5; out[1]]
According to the Help
, ''Every time a module is evaluated, a new temporary symbol is created'' and ''Block localizes values only; it does not create new symbols''
Clear["`*"];
f1[x_] := Block[{out}, Table[out[i], {i, 1, Length[x]}, 42]]
f1[{1, 2, 3}]
Module
. For example,f1[x_] := Module[{out}, Table[out[i] = x[[i]], {i, 1, Length[x]}]; out[1] + 2*out[2] + out[3]^2];
thenf1[{1, 2, 3}]
evaluates to14
and neitherout
nor its indexed values are defined in the global name space. $\endgroup$