This will explain file I/O, this or this will explain how to search the array once it is loaded.