Tracking variable array lengths with the Parameter

This is a preparation to be able to calculate the maximum message size
beforehand and to add validation checks.