@Chelton, the OP's title does say "swap" but, he wants to move Array1's position into an Array2 position that is equal to Array1's value.
If Array1[1] = 1 then Array2[1] should = 1
If Array1[1] = 2 then Array2[2] should = 1
If Array1[1] = 3 then Array2[3] should = 1
The OP has not given the Length of the arrays. He only stated that Array 1 and Array 2 are of equal lengths. The example was of 3 values. But for all we know the real array length could be in the 10's,100's, or 1000's.
The OP also stated he wants to do this in 1 scan cycle which also complicates the solution.
So, my only conclusion is:
1. Use EQU and MOV for a small array length. The number of rungs needed would be the Array length squared.
2. Create a 3rd array with values equal to the array element # and use a FSC to find Array 1's value in Array3 and move FSC.POS value into Array2[element]. But this would require 1 FSC per element in the array. So, the number of rungs would be equal to the Array length.
3. Use a FOR/BREAK instruction and put a FAL in INC mode and a MOV instruction in the call routine and loop for Array length. This would only increase program scan cycle by the loop time. Which again depends on the actual length of the Arrays and the PLC.
Option 1 is an example I gave in post #12
Option 2 is also an example I gave in post #12
Option 3 is an expanded idea to post #3. I added a FOR/BREAK loop and would change the FAL mode from ALL to INC.
I had fun last night playing around with your formula in excel and trying to make it work with larger arrays. But only had success using =lookup() and =ifs(). The MOD returning 0 always seemed to get in my way. I may play around with it tomorrow at work if I have time with my desktop PLC but I expect I'll be too busy. Anyway, if you come up with a solution, please share I know you down under boys can be very innovated.