The evolution of gene collectives: How natural selection drives chemical innovation