I know the feeling well! Glad you got it sorted.
To kind of answer your questions (I'm no code expert):
No, the outlets won't work in a loop like that, you'd end up with the last calculated values at the end of the loop. But when you put the midi code in, it's sending each message to the midi output buffer, so they all get queued up and sent out.
You could also use this for the controller input - recieve the midi and store it in an array.
For this kind of stuff (controllers/buttons/leds) check out rbrts midi table store and table send,. Using the table for the array is useful because you can save them to the sd card for templates or whatever.