foreach loops are not allowed to have multidimensional brackets when declaring loop variables.
Even if most tools allow it, refrain from using this syntax to keep your code portable.
module top;
int array[8][8];
initial begin
foreach (array[i]) begin
foreach (array[i][j]) begin // Noncompliant
array[i][j] = i * j;
end
end
end
endmodule