My thoughts are to remove the wrapped halyard
from the mast
so that you are then free to work in getting it off the stay:.
Here's how I'd do it: get a tennis ball or soft rubber ball; insert a LIGHT string through its middle (light enough so that you could snap it if you need to in case it gets caught around something); ease out a lot of your halyard
so that it sags down in a big loop between the top of the mast
and where it is hung up on the rear stay; throw ball over loop in halyard; retrieve ball; attach a messenger line (more than twice the length of your mast) to the end of halyard at base of mast; attach a stronger line to the light line that you have previously attached to the ball; using the messenger line attached to the ball draw a stronger line over the halyard loop; using this stronger line pull the loop of the halyard down to the cockpit
floor until you come to the joint between the halyard and its messenger line that has been drawn up the mast from its base and which you now have in hand; untie the halyard from its messenger line and secure thismessenger line so that it doesn't escape; with all of halyard now free in your hand go to the rear stay and start unwinding the halyard from the bottom; hopefully the halyard will unwrap or possibly start to slide down the stay. If you still can't get the halyard unwrapped from the rear stay then run a new hayard up the mast & cut off as much of the wrapped halyard as high up as you can (or coil the wrapped halyard and wait until it slides down the rear stay or rots off) ---go sailing with the new halyard or hike someone up in a bosuns chair along your topping lift
to where they can reach the wrap.--go sailing.
Just my 2 bits --beats standing on the stern waving poles, boathooks, brooms etc in the air while getting a very stiff neck