Can I $addToSet and upsert an array?
This Behavior is now supported by Mongodb 3.2
From MongoDB documentation:If the field is absent in the document to update, $addToSet creates the array field with the specified value as its element.
https://docs.mongodb.org/manual/reference/operator/update/addToSet/