In an article Dr. Blaire suggested that until there was contact with western societies, many societies had a more fluid notion of gender roles https://www.psychologytoday.com/us/blog/inclusive-insight/201809/has-gender-always-been-binary
I am not sure that I agree with this idea. Gender is culturally defined, and is an eidos related to sex, as I suggest in Preprint From Gender and Race to Eidos: A broader term for culturally...
But that does not mean that gender is likely to be fluid. From what I can see, it is not that gender roles were fluid, but rather that there are simply a number of cultures with ternary and quaternary gender divisions. For instance, many Native American tribes expressed the concept of “two-spirit” people. This established a quaternary gender system. But I don’t think that people easily existed outside of those four roles or that the roles were not well defined. It’s just that there were more of them.