Why can't you use two arrays, one for <SIDX> and one for <SIDX2>? If the results from the two files are going to two different places why not keep them seperate to start with?
Yes this means You'll have to do two searches, one on each array.
The only other idea I have is when you join the two lines into the array, have some known character divider (i.e. ":") and just split the result on that character.