fixed logical array constructors
fixed codegen for maxloc and minloc