Simple implementation of variable-length arrays.