make originalIndexArray optional in insertIntoSortedArrays()