ChatGPT chose to use one of the most primitive and inefficient methods of handling a whitelist, an array. This is fine for small whitelists, but for anything over a couple hundred addresses a merkle tree would be best.