Another trick with arrays is sizing them. This article shows you how to size your arrays dynamically.
By Joe Pluta
In an earlier article, I showed you how to initialize arrays and how to sort them based on a subfield. I did this with fairly small arrays, where you could easily define the values for the array in your D-specs. The next trick is trying load arrays from disk. You don't know how many you will load, and you really don't want to allocate the memory for the entire array.