One way could be to create another array of the same dimensions. Then when you check your file array, just do something like

If secondArray[indexOfRndLine]=0
; not been used
set secondArray[IndexOfRndLine]=1
else
already used
endif