You can't access a variables by using strings. What you can do instead is manually create an array of pointers to the values you want to index, for example:
DI_Section1_Valve AT %I*: BOOL;
DI_Section2_Valve AT %I*: BOOL;
DI_Section3_Valve AT %I*: BOOL;
DI_Section_Valves: ARRAY [1..3] OF POINTER TO BOOL
:= [ADR(DI_Section1_Valve), ADR(DI_Section2_Valve), ADR(DI_Section3_Valve)];
FOR i:= 1 TO 3 DO
out[i] := DI_Section_Valves[i]^;
END_FOR
EDIT: Alternatively, you could create a function that does this:
METHOD Get_DI_Selection_Valve : BOOL
VAR_INPUT
i: INT;
END_VAR
CASE i OF
1: Get_DI_Selection_Valve := DI_Section1_Valve;
2: Get_DI_Selection_Valve := DI_Section2_Valve;
3: Get_DI_Selection_Valve := DI_Section3_Valve;
END_CASE
FOR i:= 1 TO 3 DO
out[i] := Get_DI_Selection_Valve(i);
END_FOR
The idea is the same though