In theory, any keyboard is programmable to a limited extent. The problem is that you have a fixed set of scancodes which are valid, a fixed set of memory, and potential layout issues. (e.g. impossible to create certain Function Layer combinations in matrix layouts without true dioded NKRO.)
Roccat Ryos is probably going to be your best bet, depending on how open the SDK is - 94 key layer and 2MB of addressable memory for layers. There was another keyboard - Korean IIRC - we were recently discussing that offers a high level of programmability but the name escapes me.