just to clarify.
in this your case lines would be something like I showed but adding the placing to variable misc.

like:

for $counter=0 to 7
if $compare = $a[$counter]
$misc1 = $b[$counter]
$misc2 = $c[$counter]
endif
next
_________________________
!

download KiXnet