codegen: eliminate extract_string using array_length