Untested, but maybe this can guide you:
instr output
aIns[] init 32
aOuts[] init 32
aIns in ; throw all inputs into an array
kIndex = 0
while kIndex < 32 do
aOuts[kIndex] = aIns[kIndex] * gkGain[kIndex] * gkTriggers[kIndex]
kIndex += 1
od
out aOuts ; output all signal as an array
endin

