This avoids losing their memory when the parser state is freed.
Adds a new constructor that takes an array of component values. Refactors the meat of the two constructors to an init_mask method.