Right now, the TemplateField's translate method returns a TemplateFieldOutput with an output property that is an array of either string or null. This is because the TemplateField's validate method converts individual invalid outputs in the procedure's output to null.
This behavior was chosen to be able to identify individual invalid values in array fields. However, it complicates things in some consumers of TemplateField such as the template.ts's outputToCitation function, because a valid template field output should not have nulls.
Consider having the validate method always return an array of string (i.e., a StepOutput). If any of the procedure's output values under validation is invalid, return an empty array.
In addition, consider removing the valid property from TemplateFieldOutput as it is redundant (it may be inferred from the output value).