codegen: use vector_size to eliminate extract_vec