You can start by writing a program that can do that for one array. When that works you expand the program to handle several arrays.

If you can check whether a position is zero in one array it's...