library ArrayUtils { static function getElemAt(bytes b, int idx) : bytes { return b[idx : idx + 1]; } static function setElemAt(bytes b, int idx, bytes val) : bytes { return b[0 : idx] + val + b[idx + 1 : len(b)]; } }