Keeping large datasets tidy in an Arduino project

I'm currently working a project using an ESP8266 as a WiFi-connected IR blaster replicating a TV remote. At some point I'd like to release the project to the wild, so to be useful it would need to support a wide variety of different TVs (at least one configuration per manufacturer).

With each remote having 20+ buttons, and from what I've tested so far, each button produces one of two codes each time it is pressed, storing this much data in a .c file under a switch statement or series of #ifdefs has the potential to quickly become a WET mess that is potentially difficult to add to.

Is there a cleaner way I could write a project with this kind of data? Maybe read in from a .txt or .json file at compile time, selected by a single variable for the manufacturer of the TV?

Have you considered to store the IR codes in EEPROM (external if ESP does not have EEPROM or insufficient space, else internal).

Look at how it is done in the various LCD libraries that hold font data in the library. Probably less data than what you have but I'm sure there are some good ideas on organization.

Thank you for your suggestions.

sterretje:
Have you considered to store the IR codes in EEPROM (external if ESP does not have EEPROM or insufficient space, else internal).

I'm not so concerned about the size of the program as I am about the size of the project - I'm fairly confident that after the compiler has performed its optimisations all the unused code for a given configuration will be left out.

MorganS:
Look at how it is done in the various LCD libraries that hold font data in the library. Probably less data than what you have but I'm sure there are some good ideas on organization.

Thanks, having looked at a few, they seem to take an approach I think I could use.

MrE_Street:
Thank you for your suggestions.
I'm not so concerned about the size of the program as I am about the size of the project - I'm fairly confident that after the compiler has performed its optimisations all the unused code for a given configuration will be left out.

Maybe I misunderstood. But wouldn't it be nice if the user could simply change between remotes instead of having to recompile? Probably depends on the intended audience.