Instead of using StrIndexOf(), why not use StrSplit?
B4X:
Sub Globals
'Declare the global variables here.
Dim ArrParseLine(0)
End Sub
Sub App_Start
Form1.Show
FileOpen(C1,"Filename.txt",cRead)
ParseFile
End Sub
Sub ParseFile
FileLine=FileRead(C1)
Do While FileLine<>EOF
Dim ArrParseLine(0)
ArrParseLine()=StrSplit(FileLine,cTab) 'I tend to use Chr(9) - just personal preference
'...
'Work with your Array components here; ArrParseLine(0) will be the first field before <Tab>, ArrParseLine(1) will be the next, etc.
'Use a For/Next if you don't know how many fields will be in each line:
For i=0 To ArrayLen(ArrParseLine())-1
'...
'do stuff with ArrParseLine(i)
Next
FileLine=FileRead(C1)
Loop
End Sub