Optimize `_.contains` for arrays.