Something similar to the C# library https://github.com/Dasync/AsyncEnumerable
or the Parallel.ForEachAsync
But also handle the possibility to return all the values, so like a "Promise.all(...)" with a parameter to set the concurrency limit
Some ideas:
https://www.npmjs.com/package/p-limit
https://www.npmjs.com/package/p-map
https://www.npmjs.com/package/p-queue