Yeah, I totally agree with @bnoordhuis -- this should be a `struct`.  Doing it with the int array requires surprising code, and is not self-describing or easily debuggable.