Did the Ancient Israelites Think Children Were People?

The Book of Exodus presumably reflects the views of its Israelite authors on their deity, morality, and the like. Why then would the Israelites have imagined Yahweh slaughtering Egyptian children for sins the children themselves had not committed? Did the Israelites even think children were persons with any type of rights?