Hi,
I don't know you data structure correctly. But as Michael Munroe said, the way is tu put 3D array into for loop, then you have 2D array. Then if you index 2D pole, first element should be X channel, second element should be Y channel (but as I said I don't know your data structure precisely).
Simyfren