Convert stack shuffling, pos, and type to simple builtins