It depends on which operation you want to execute. Let's assume that you want to find an object with a given ID.
- The huge array approach is fastest: Accessing
myArray[84397]
is a constant-time operation O(1). Of course, this approach requires the most memory.
- The dictionary is almost as fast but requires less memory, since it uses a hash table internally.
- The list of pairs approach is the slowest, since you might have to traverse the whole list to find your entry, which yields O(n) complexity.
Thus, in your situation, I would choose the dictionary, unless the marginally better performance of the huge array is really relevant in your case.