Implement CollectFunctorAtoms and CollectNonFunctorAtoms.