12 Input buttons, 26 outputs, groups of various size, interfaced to relay shield

Hi, new, bit off more than i can chew, looking for some example code for expansion. Here is my mission that I took on, have 4 days to complete:
have 12 pushbuttons for a project. Each button needs to light a set of several lights. 26 total lights, various configurations light depending on button pushed. Already have interface 16 relay boards and mega. Understanding logic, I will need to assign inputs and outputs, have mega scan for button push and activate set output sets for each button. The interfacing is not a big deal for me as I will set the logic outputs to proper low to trigger relays as needed, and have seperate control voltage for the output side of things.. If you could point me to coding to allow the lights to illuminate upon button push and release when released that would be great. Another thing I may need is some type of 'random' or sequential triggering like a screensaver, so that lights will illuminate when there is no action for several minutes, to attract attention, then on to the main program when someone actually interacts with the buttons. If there is a snippet for a few inputs and assigned outputs for the main program, I can easily expand on that to make up the required quantities. I have only done some rudimentary programming like the Knight Rider, so I have a feel but am by no means accomplished at this, but have committed to do, so this is my first big project for real world. Any advice is greatly appreciated, I will do the footwork, just need pointed in correct methodology rather than spending hours perusing code that is not relevant to this. If (when) successful I would be proud to post the end result, as I am more electrician than EE, that is what makes the Arduino a great platform. Thanks in advance..

start with the example 'button'

const int buttonPin = 2;     // the number of the pushbutton pin
const int ledPin =  13;      // the number of the LED pin

int buttonState = 0;         // variable for reading the pushbutton status

void setup() {

  pinMode(ledPin, OUTPUT);         // initialize the LED pin as an output:

  pinMode(buttonPin, INPUT);       // initialize the pushbutton pin as an input:

void loop(){
  // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);

  if (buttonState == HIGH) {     
    digitalWrite(ledPin, HIGH);  
  else {
    // turn LED off:
    digitalWrite(ledPin, LOW); 

if you do this, then the else will turn off the led pins.

better to have one off stage at the end of the program that turns off all leds on each loop through.

if you start with this as a one button one light program you can get many lights working.

if you create a state machine and a random number generator, you could turn lights on at random, until a button is pressed then it would break out of that state machine and back to the main program.