Database

[{"collection":"collection","count":100,"content":{"_id":{"type":"stringFromParts","parts":[{"type":"constant","constVal":"blabla"},{"type":"autoincrement","autoType":"int","startInt":0}]},"userName":{"type":"stringFromParts","parts":[{"type":"constant","constVal":"blablabla"},{"type":"autoincrement","autoType":"int","startInt":0}]},"interactedUsers":{"type":"array","minLength":0,"maxLength":20,"arrayContent":{"type":"stringFromParts","parts":[{"type":"constant","constVal":"blabla"},{"type":"int","minInt":0,"maxInt":99}]}}}}]

Query

db.collection.aggregate([{"$match":{"_id":"blabla0"}},{"$lookup":{"from":"collection","let":{"notIds":{"$setUnion":[["$_id"],"$interactedUsers"]}},"pipeline":[{"$match":{"$expr":{"$not":{"$in":["$_id","$$notIds"]}}}},{"$project":{"_id":1}}],"as":"strangers"}},{"$set":{"strangers":{"$map":{"input":"$strangers","in":"$$this._id"}}}}])

Result