findDirectChains function

Find all arrays linked to an array in a given direction