Database

[{"_id":1,"data":[-1,100,150,200,-1,-1]}]

Query

db.collection.aggregate([{$project:{indices:{$filter:{input:{$range:[0,{$size:"$data"}]},cond:{$eq:[{$arrayElemAt:["$data","$$this"]},-1]}}}}}])

Result