First, convert your HTMLCollection using Object.entries(collection). Then it’s an iterable you can now use the .map method on it.
Object.entries(collection).map(...)
reference
https://medium.com/@js_tut/calling-javascript-code-on-multiple-div-elements-without-the-id-attribute-97ff6a50f31