There are many factors to head formation. Yes and no to gluten being the head formation. Gluten is a protein and protein is a main proponent to head formation. Amaranth has loads of protein. Everything you listed, except chestnuts, can form a head. Maltodextrin can really help. It is gluten free in 99% of cases.
I recently made an IPA with mostly millet, a bit of amaranth, quinoa, and .5# of maltodextrin. It has a great head on it.
Kegged: The Colonies English Pale
Bottled: Ginger Apricot Saison, Brett C. Pale, Orange Pale Ale Aged on Yellow Birch, Non-Black IPA, Brett C. Cider, PB & Banana Porter
Oaking/ Aging: Infected Pale
Fermenting: Imperial Black IPA, Cranberry-Wit Cider