update arrayToWhere to use arrays