Off the top of my head, you can do this in search & replace.
Search field: template
Search template: program: list_intersection($#ao3tags, 'tram, train, bus, ferry', ',')
Search for: (^.*$)
Replace with: \1
Destination field: #genre
Mode: Append to field
The template produces a list of acceptable values (the second parameter) from tags. The rest S&R appends that list to #genre. Duplicates will be removed in that process.
EDIT: You didn't say if you want to use Action Chains Single Field Edit. If you do then this template should work
Code:
program:
a = list_intersection($ao3tags, 'tram, train, bus, ferry', ',');
list_union($#genre, a, ',')