So I have a loop that initializes elements and attributes from an array, and I\'ve managed to add everything I need except one thing, a function. The loop in question is b