In kullu shayʾin, kullu is the generalizing idafah head and shayʾin its genitive complement. Illā introduces an exception; al-nisāʾa is the accusative excepted term.
The exception preserves a particular restriction within an otherwise general release. The phrase must be interpreted in its legal marital context, not as a blanket claim about women as persons.