You would end up with:
plans : [ null , 14 , 20 , 40 , null , 50 ]
Note that plans.X would gives the same value whether plans is an array or an object. Array are simply, more efficient as no storage is use for the key (index). Except may be for sparse array.
Also note that with mongo (the old shell, I do not know about mongosh), you do not end up with an array.
> db.test.insertOne( { _id:1 , plans : { "1": "one" , "3" : "three" } } )
{ "acknowledged" : true, "insertedId" : 1 }
> db.test.find()
{ "_id" : 1, "plans" : { "1" : "one", "3" : "three" } }