Here is a solution that works.

$a=(range(2,4))^2;
$b=range(1,3);
$t=range(0,3);
$vz=maple("convert([`<`,`>`,`<=`,`>=`][1],string)");
$symb=$vz;
$t2=range(1,4);
$set=maple("map(expr->convert(expr,string),[[x,abs(y)],[y,abs(x)],[y,x^2],[x,y^2]][$t2])");
$l=switch(0,$set);
$r=switch(1,$set);
$eq=$vz;
$lhs=maple("latex($l $symb $r)");

Let me know how you get on.