Are marker1, marker2, and marker3 markers or variables that contain names of markers? If they are markers, your array needs to look like this:
markerarray = ["marker1", "marker2", "marker3"]
And then you run this on it:
{_x setMarkerType "EMPTY"} forEach markerarray
You simply can not do anything with forEach without _x in the code string. If the element _x points to is a string, it will use the string for _x. If it points to a variable containing a string, it will use the string for _x.