To walk or crawl "on all fours" means to get about on hands and knees like a four-legged animal, or the process of locomotion by such an animal itself.
The word four can be used as a determiner to describe a quantity of items, in which case the noun is plural: four bricks, four beers, four colors. But somehow, in the expression "on all fours" the plurality has shifted from the noun (presumably legs in this case) to the determiner itself. I can think of no other case where this has happened.
From Etymonline's entry on four:
To be on all fours is from 1719; earlier on all four (14c.).
So somehow it got from a shortening of (again presumably) "on all four legs" to "on all four"; then at some point during the next several hundred years, mirabile dictu, somehow the s migrated from legs to fours.
I'm looking for where and how this could have happened. Please do not respond to tell me what the phrase means or anything like that. I only want to know how the s got transferred from noun to number, or examples of other words that have undergone a similar progression, should any exist.