Revert "use array contains everywhere"

This reverts commit c1ca9d66a95b4991ddcc0bba1a6a5010eb4dc042.