pack n-bit integer array in a m-bit integer vector