This is a more efficient version of the template, making use of the fact that the universe prefix doesn't change for a given book.
Code:
program:
result = '';
if $#chars then
# The universe name is a constant for each book. Compute it once for efficiency
prefix = strcat(result, first_non_empty($#universe, $series, $title), '.');
# Loop through the characters adding the universe prefix to the character
# and adding a trailing comma
for char in '#chars':
result = strcat(result, prefix, char, ',')
rof;
# Clean up the list, adding spaces and removing the trailing comma
result = list_union(result, '', ',')
fi;
result