Arrays initialization and indexing

Hello everyone,
I’m writing a code for a production line, where we have ‘m’ machines and ‘m-1’ buffers. The code should be general and I want to initialize the first machine production from a zero array, that will have elements on the basis of number of parts we are producing. The parts passes through machines, but there are some parts which skips some machine, as they are not required to be processed by that machine, so now I am confused with it that how to let a machine to skip some entities at some point depending upon the sequence. I can share more details along with figures if someone has time to discuss. Thank you