Directed evolution
The basic idea is to put a gene through repeated rounds of mutation, to make a library of variants. Selection isolates genes with the desired function. They are a template for the next round.