Abstract output of data to a format_items() utility function