Fixes Postgres' ability to search within functions.

This is a pure and simple fix for searching with a Postgres' array column type.
This commit changes hashToWhereConditions by adding a second argument of sending
the factory's details over and checking for column type if the hash/value/first
argument is an array. For the actual search we just utilize a simple overlap &&
boolean search.