Simple multi-input tutorial for Processing beginners (ver 3.5.4)

Many beginners and some intermediate coders have run into conflicting issues with using multiple key inputs for their sketches. keyCode and key are single-value variables that track the last key pressed. As such, they cannot store multiple sets of key data on their own.
Thus, I provide the following template:

/*number-indexed keys:*/
boolean[] keys;
void setup() {
  /*I use 1 key but you can modify length to include up to all 128 byte values*/
  keys = new boolean[1];
  for (int i = 0; i < keys.length; i++) {
    keys[i] = false;
  }
}

void draw() {
  if (keys[0]) {
    //statements
  }
}

void keyPressed() {
  if (key == CODED) {
    /*keyCode 37 used for demonstration*/
    if (keyCode = 37) {
      keys[0] = true;
    }
  }
}

void keyReleased() {
  if (key == CODED) {
    /*keyCode 37 used for demonstration*/
    if (keyCode = 37) {
      keys[0] = false;
    }
  }
}

the way I usually do it is by creating a char list[] of acceptable inputs and a boolean list if the key is pressed and wire things like

if(pressed[0]) {
    //do stuff
}

Studio.ProcessingTogether.com/sp/pad/export/ro.9cfU11egvzT6G