Database
[{"_id":"Fubar","A_set":[{"A":"Y"},{"A":"N"}],"A_count_set":[{"A_count":0},{"A_count":1}]}]
Query
db.collection.aggregate([{$project:{anotherValue:{$map:{input:{$range:[0,{$size:"$A_set"}]},as:"idx",in:{$mergeObjects:[{$arrayElemAt:["$A_set","$$idx"]},{$arrayElemAt:["$A_count_set","$$idx"]}]}}}}},{$set:{anotherValue:{$filter:{input:"$anotherValue",as:"x",cond:{"$ne":["$$x.A","N"]}}}}},{$addFields:{"A_set":{$map:{input:"$anotherValue",as:"a",in:{"A":"$$a.A"}}},"A_count_set":{$map:{input:"$anotherValue",as:"a",in:{"A_count":"$$a.A_count"}}}}},{"$project":{"anotherValue":0}}])