Yes, never done pointers etc. in Omron, many years since I used them, The population of the array was simple, however, I struggled with the delete a request in the array if that machine went out of auto, so did it sort of a bit of both, indirect and brute force, the populating & removal is only really one rung each with obviously rungs for setting the pointers & the for next instructions, the last four rungs were for simulation of simple conveyor control i.e. array[3] has a machine number so conveyors feed that & deletes the macine number, this allows the following machine numbers to shift down the array, also built in is a check, if a machine is already in the queue then it waits until the array does not have the machine number already, for example, if machine 1 was already in the queue and tried to put another one in it would mean that the array could be full i.e. 1241 so 3 if wanted to post a request it could not & would have to wait until there is a space, yes could increase the size of array, but that is a trade off with allowing all machines a reasonable go at sharing the availlable time slots. there is no advantage anyway as if there is a machine already in the queue as soon as there are no others in front of it then it becomes instantly availlable. I could have possibly incorporated all the functions within one loop, but then it becomes difficult to find problems & difficult to understand.
I might have a go just for fun, however, as some loops require 4 itterations & some only 3 & then add conditions so probably not gain much in reducing code.