Rework the gsharedvt code to add support for vtypes with arbitrary size.