How to match with value from B[] to A[]

Hey i have 6 Number’s Array A from 1 to 6.which i placed as layer wise in rectangular box. now i translate this number like chainwise inside this box. i have another arrayB which also have 1 to 6 number.now i supply one value from B this value match with A which is translating inside the box.my requirement is value from B should be match with the A which is in centre position of box. when value from B match with value from A in centre position my translating script become stop .For example 1 from B should be match with 1 from A and value 1 shoud be in centre position. how i match can any one suggest…

foreach (int number in arrayA){
if(suppliedBvalue == number)
{
//supplied B value matches number in arrayA
if(SuppliedBvalue == CenterPosiiton)
{
}
}

you may have to reexplain or use different words for google to translate if your using that. It’s hard to understand what you want exactly.