How to update arry of string value from another colleciton

Please provide actual sample source documents and sample result documents that we can import directly in our environment. Coming up with code is time consuming and it is double time consuming if we have to create our own documents that matches your description.

Before you do, please read Formatting code and log snippets in posts

More information about

Is it a one time thing? Something you want to automate whenever A changes?

The solution will likely involve https://docs.mongodb.com/manual/reference/operator/aggregation/merge/ and may be https://docs.mongodb.com/manual/changeStreams/.