Selecting random documents inside array of documents

Hello, I have my collection of documents where each document contains an array of subdocuments.
Im trying to retrieve, for example, 5 random documents inside of this array. How can I achieve that?
I have the id of the document to query on its array

Please post sample documents and expected results. Read Formatting code and log snippets in posts first so that we can cut-n-paste your documents in our systems.

Post what you have tried so far and explain where it fails so that we do not orient you in a dead end you already know does not work.

If you have not tried anything yet start by looking at

for the random selection part and at

because you want 5 objects within an array of a single document so you need to unwind first.

The other possible solution will involve a combination of

and probably