Database
db={taxon:[{"_id":1,"na":["root_1","root_2","root_3"],"pa":1},{"_id":2,"na":["name_1","name_2","name_3"],"pa":1},{"_id":4,"na":["otherName_1","otherName_2","otherName_3"],"pa":2}]}
Query
db.taxon.aggregate([{$match:{_id:{$in:[2,4]}}},{$graphLookup:{from:"taxon",startWith:"$_id",connectFromField:"pa",connectToField:"_id",as:"nameList"}},{$project:{nameList:{$reduce:{input:"$nameList",initialValue:[],in:{"$concatArrays":["$$value",{$slice:["$$this.na",1]}]}}}}}])