If array (B) has unique value, you can use the search array function to find the index of each of the elements in array (A). See my example below:
>
"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal