Fixed Query::set() to apply field types when an array is passed, closes #2836