Heteroatom-directed allylic substitution and rearrangement reactions