What happens when one swaps the position of 2 drives in same VDEV or RAID array?

What happens when one swaps the position of 2 drives in same VDEV or RAID array. What will happen? I think that the answers will change depending on whether it’s a hardware RAID or software.

I am using a RAID array in TrueNAS.

What would happen if I forget which drive was connected to which SATA port (not that I did or anything) during a repair or cleaning?