Few things:
all curves are at all times cv curves. even ep ones. Bow ep ones can describe many curves. So a curve with given eps CAN have several different shapes so to do this flawlessly one need to query both curve degree, point weights etc etc. and make cv curve of that kind.
You are however overlooking one of the simplest ever things (so fundamental that most people overlook this, and it works on almost every program ever devised). If you want to copy a curve for later reuse. Then just export that particular node to a maya file. The just import it when you need to load it anew. Even better this make making a gui simple as you just scan the contents of a given folder and thats it. Now if you ever want to extend out form curves to meshes or surfaces. its as easy as 1 2 3 to extend because theres no need to do anything. (this is by the way how Maya's copy paste works, it just a temp file)
Constructs like:
float $bunk[] = xform -q -ws -t $fit[$j]
;
vector $cords = <>;
Can simply be written like:
vector $cords = xform -q -ws -t $fit[$j]
;
I newer Maya's (no idea when it was introduced, pretty fare away tough). Maya just knows how to typecast this, tough there's NO MENTION of this fact anywhere