The child began to flail his arms in excitement.
To struggle or thrash about, often in a state of panic or confusion. She began to flail in the water when she realized she couldn't touch the bottom.
To beat or thresh (grain, etc.) with or as if with a flail; to strike repeatedly. In the barn the workers flailed the barley until chaff filled the air.