Never said the problem couldn't be solved, I believe it's the method used in Dayo's Gangster legends updates, and have seen it used in a few other programs without a problem. I was just pointing out it could be a potential threat if done wrongly. In this case the array does it's job. He could have also use the scandir() to create an array of files rather then typing them all out. May not have been the best way, but it would work without any issues (once again if done correctly).
My opinion - The array was not really a "silly" move. Just added a small extra task when adding a feature to the game.