// constants won't change. They're used here to
// set pin numbers:
int buttonPins[] = {
2,4,7,8,12}
; // the number of the pushbutton pin
int ledPin = 13; // the number of the LED pin
None of these comments are even close to being useful. Most of them are plain wrong. Variables are not constants, without the const keyword.
Using three lines to define the array looks silly, too.
All the serial data is going to Processing. So, for one switch press, it gets "ONx<cr><lf>VALy<cr><lf>z".
// Expand array size to the number of bytes you expect
byte[] inBuffer = new byte[5];
So, how are those 12 values (per switch) supposed to fit in a 5 element array?
inBuffer = myPort.readBytes();
myPort.readBytes(inBuffer);
There are two overloads of the readBytes() method. You should be using ONE of them, not both.
You need to remove most of that stuff you are sending. Send something like "n=x<cr><lf>", where n is the pin number and x is the state for every pin, pressed or not.
In Processing, you need some major redesign. You need to use the Serial::bufferUntil() method to tell Processing to accumulate the serial data until a specific character has arrived (like the <cr> or <lf>).
You need to add a serialEvent() function. Processing will call this when the bufferUntil() character has arrived. Then, you can read the serial data using readStringUntil(), to get the whole string.
Then, you can use int() on that string to get an array of integer values from the string (containing n in the 0th position and x in the 1th position). Then, you can use those ints to do whatever you want.