Your for-loops are all in series, that is one following another, therefore your approach is unlikely to allow control of multiple pins concurrently.
A different way to look at this problem is to phrase it as: What value does each pin have at timestep T? Thinking about the answer leads to something like the following p-code:
while looping:
val = ValueForPin1()
if (val != -1) SetPin1(val)
val = ValueForPin2()
if (val != -1) SetPin1(val)
...
val = ValueForPinN()
if (val != -1) SetPinN(val)
# other code here
delay(30)
the ValueForPinX() functions can be a single parameterised function, which would be easier to manage. Also, you can build a for loop over all pins, setting each one's value accordingly inside the loop. The important thing is to decouple the determination of a pin's value from where that value is used.