Dynamic association of flavin cofactors to regulate flavoprotein function