arrange
Writes each child's offset from the top of totalSize into outPositions, for children whose heights are sizes in declaration order. outPositions is as long as sizes.
Both arrays belong to the container laying out and are reused by its next pass: read and write them within this call, and keep neither.
Parameters
totalSize
the container's height inside its insets, the gaps this arrangement holds included.
sizes
the heights already granted, which an arrangement reads and never changes.
outPositions
arrives zeroed, so an entry an arrangement leaves alone places that child at the container's top edge.