I’m essentially just wondering what’s the right way (if possible) to create a module that has a block which represents a list of things (could be products, images, whatever), but instead of having the HTML of each element in the list being defined in that block’s template, I’d like to have each element be an instance of some separate template, so that you easily modify just the look of the individual elements of the list without needing to override the template for the containing list.
I’m aware of createBlock(), but I’ve seen a lot of back and forth about its use not being best practice, is that the general consensus? Does using dynamically created blocks have any performance hit, like not being as cacheable, or maybe not being as easily overridable in layout XML files?
Of course, the assumption in my question is that the way to do this would be with blocks, but perhaps the actual answer is to use UI Components instead?