Unless performance is known to be an issue, you cannot improve on (3). The first two have too much overhead & manual handling for use in production software. Today's hard drives do an excellent job of caching data and performance should not be a problem in most circumstances.
If you absolutely MUST read the records into memory, your best shot (and what used to be done routinely) is to estimate the number of records you'll need and increase it a lot so that most of the time it will require only one run and no recompilation. If you error out, then you'll have to increase the table allocation. It would take a LOT of performance consideration to make this method preferable to (3) just on the basis of lousy programming/design technique.
These are essentially your options. If you want to provide more info on what you're trying to accomplish there could be further suggestions... GLTY.