check if field value exists then add to array