Use the c++ typesystem to better track value ownership, also implement codegen for Select and dot