Getting the position of a certain element in an array

Hi

  1. let’s say I have an array full of mcs, is there a fast way of knowing the position of mc_b in that array without looping through it every time?

  2. also, is there a fast way of swapping the position of two elements in an array without splitting it and re-sticking the parts?

Thanks