need assistance creating a pneumatic spectrum analyzer

Greetings,
Like many here I am very new to programming so please forgive my ignorance. I am trying very hard to pick this up as quickly as I can.

A little background...
Basically I am making an spectrum analyzer using pneumatic cylinders and an MSGEQ7 chip. I have access to a couple UNOs, DUEs, and a MEGA to play with. Eventually, this will control an SPI serially operated valve manifold with 16 cylinders.

Right now I am looking for a way to control several pneumatic valves. Each valve controls one cylinder. All the cylinders are identical, but will have a different end position based on MSGEQ7 array of analogRead values. I plan to use either some sort of linear encoder or a number of switches to determine when the cylinder has reached its setpoint. My current direction is to use a FOR LOOP with a SWITCH CASE for each valve to determine whether or not to turn on the valve and create a new set point.

I have been trying to follow my pseudo code in small steps, but I'm not sure if I am going in the right direction.

pseudo example of my pseudo code produced from a pseudo understanding of pseudo C/C++ code:
for(7 loops) //7 cylinders
switch (x)
case 0: //cyl 1
if currentValue[] > oldValue[]
oldValue[] = currentValue[]
extend cyl to currentValue[]
else if delayPeriod < millis() - sampleTime
oldValue[] = currentValue[]
extend cyl to currentValue[]
break

case 1: //cyl 2
same as above

case ...

Hopefully that makes sense to someone other than me.
My problem, other than brain drain, is that I'm not sure where to put the code to determine whether or not the cylinder has reached its set point and then to retract. I think that if I put it in the switch case, everything will stop until that the cylinder movement is complete. From reading, it sounds like this is a reason to use an interrupt, but I don't understand how that works or even if it is the right thing to do.
I have been trying to emulate some of the LED spectrum analyzers, but LEDs react so much faster than pneumatic equipment.

Any help will be greatly appreciated.

If the code for "cyl2" is the same as the code for "cyl1", why have a separate "case"?
Why have a "switch/case" at all, why not just an array?

Good point, I never thought about just loading the array.

I'll give that a try. Thanks.