Prefer <Array>.pack() and <String>.unpack().

As opposed to reimplementing the packing logic verbatim, we should
leverage the <Array>.pack() and <String>.unpack() methods.