What controller are you using? What messages is it sending? Let me know and if I get time I'll do a basic patch if I can.
I've found tables are the way to go for this.
The basic idea is to toggle on and off elements of a table, and then have a separate object that reads it out, controlled by a counter.
And for the lights, you have another object that reads the same part of the table and it sends midi messages back to the controller for feedback.
Rbrt's objects are really useful