The example you found is reading binary data from a file directly into an array. You have a file with comma separated string values. Remember also that using filestream to read huge files is consuming x times your file size in memory. Eny wrote that when reading a TStringList directly he notice a x10 memory peak.
The folowing code will read lines in the format 1,2,3,4,5,6,7,8,9 and put them in an array in one pass:
var
myFile: TextFile;
s,s2:string;
i,j,ipos:integer;
history: array [0..9, 0..8] of Integer;
begin
if opendialog1.execute then
begin
AssignFile(myFile , OpenDialog1.filename); // Try to open .txt file
Reset(myFile); //Reopen file for reading
i:=0;
While not EOF(myFile) do
begin
readln(myFile,s);
j:=0;
while s<>'' do
begin
ipos:=pos(',',s);
if ipos>0 then
s2:=copy(s,1,ipos-1)
else
s2:=s;
delete(s,1,length(s2)+1);
if j<=8 then
history[i,j]:=StrToInt(s2)
else
writeln(format('Too many characters in line %d',[i]));
j:=j+1;
end;
i:=i+1;
if i>9 then
begin
writeln('Too many lines in file');
break;
end;
end;
CloseFile(myFile);
end;
end;
Adapt the array as you need.