Pass array of objects including element attributes

Array of objects can also be passed as list option which makes it possible to add arbitrary attributes to the rendered span elements.

Needed for a project where words represent categories and further details of the categories should be appear on mouse over.
See commit comment for further details.