There are multiple issues here. The most complex involve expansion, as indicated in the comments. Let's start with the simplest.
First, you have a sprinkling of excess semicolons. These don't cause errors, but you do get warnings about the character not existing in null font. This is pgf/TikZ's way of pointing out you have garbage stuff which you might have thought was real content.
\def<spec>{<definition>} does not need to be followed by a semicolon.
- If you define a semicolon into a macro, you need to take this into account when using it. So either delete the final semicolon from the definition of
\centerarc or don't follow it by a semicolon when you use it.
For example,
\def \cpt{(1,2)}
\draw (0,0) node [right] {cpt position coordinate = \cpt } ;
\centerarc[ultra thick, cyan](1,2)(-30:30:2)
will avoid the warnings.
Second, ((0,3)++(180-30:3)) is not a valid coordinate. This will give an error regardless of whether \def is involved. I'm not certain what you meant here, but I'm guessing ($(0,3)+(180-30:3)$) and have amended the definition on that basis.
Third, you can't use a numeral in a macro name. Only letters are allowed.
\def \cpt2 {($(0,3)+(180-30:3)$)}
[Thanks to Heiko Oberdiek for correcting me here.]
This redefines the macro \cpt so it expects to be followed by 2 and then expands to {($(0,3)+(180-30:3)$)}. So trying to use \cpt2 without a following space will cause an error.
There are special ways around this restriction, but there's no need of them here. We can just use a different name. For example,
\def \cpttwo {($(0,3)+(180-30:3)$)}
Fourth, you have serious expansion issues here. When you put \cpt into a node, all is well. When you try to substitute it for a literal coordinate, things go haywire.
\centerarc[ultra thick, purple]\cpt(-30:30:1)
TeX reads tokens one-by-one from a stream, which is like a long line of tokens. \centerarc is the first token here. That's a macro, so TeX looks up its definition and finds that it absorbs [#1](#2)(#3:#4:#5) so it reads on to scoop up #1, #2, #3, #4 and #5 in order to slot them into the appropriate places in the definition. That means TeX expects to see a [ first. No problem there. It knows #1 is everything until the next ]. So #1 is ultra thick, purple and that can be slotted into \centerarc's definition. Next it expects ( but instead it finds \cpt which doesn't match the template it has for \centerarc. So you get an error. To correct this, you need \cpt to be expanded before [ultra thick, purple]. You could do that with a whole bunch of \expand afters, but you'd need to jump every token separately i.e. the [, the u, the l and so on. That's a lot of typing and a recipe for inscrutable code.
\def\myopts{[ultra thick, purple]}
This turns that group of tokens into a single token \myopts, making it easier to skip. So, we want
\expandafter\myopts\cpt
But if we just do that, it still won't work because \centerarc will now see \expandafter rather than [ as the first token. So we need to expand \centerarc after expanding \expandafter.
\expandafter\centerarc\expandafter\myopts\cpt(-30:30:1)
This gets \cpt to expand first, so TeX will see
\centerarc\myopts(1,2){-30:30:1}
Now the problem is \centerarc expects [ to begin with and not \myopts. So we need another \expandafter.
\expandafter\expandafter\centerarc\expandafter\myopts\cpt(-30:30:1)
But that's not quite good enough, because \expandafter\expandafter\centerarc expands \centerarc first, which was where all the problems started. Hence, we need a third \expandafter at the beginning for a total of five.
\expandafter\expandafter\expandafter\centerarc\expandafter\myopts\cpt(-30:30:1)
Similarly, for the case with \cpttwo,
\expandafter\expandafter\expandafter\centerarc\expandafter\myopts\cpttwo(-30:30:3)
I've referenced an answer below which explains the same idea in a simpler case, so you might want to read that if the multiplicative effects of \expandafter above seem unduly alarming. (I did try doing it token-by-token to show what \myopts avoids, but I got entangled and gave up.)
Complete code:
\documentclass[border=1cm]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc} % required for \centerarc
\begin{document}
\begin{tikzpicture}
\def\centerarc[#1](#2)(#3:#4:#5){\draw[#1] ($(#2)+({#5*cos(#3)},{#5*sin(#3)})$) arc (#3:#4:#5); }
\def \cpt{(1,2)}
\draw (0,0) node [right] {cpt position coordinate = \cpt } ;
\centerarc[ultra thick, cyan](1,2)(-30:30:2)
% ateb: https://tex.stackexchange.com/a/701593/
% i gwestiwn Leon Chang: https://tex.stackexchange.com/q/701586/
% refs: Caramdir https://tex.stackexchange.com/a/18316/
\def\myopts{[ultra thick, purple]}
\expandafter\expandafter\expandafter\centerarc\expandafter\myopts\cpt(-30:30:1)
\def \cpttwo {($(0,3)+(180-30:3)$)}
\expandafter\expandafter\expandafter\centerarc\expandafter\myopts\cpttwo(-30:30:3)
\end{tikzpicture}
\end{document}

Needless to say, I don't recommend implementing this!
\def \cpt2 <other stuff>. Defines\cptso it expands to2and leaves<other stuff>in the input stream. You can't use numbers in macro names. (At least, you can if you really need to, but not like this.) – cfr Nov 18 '23 at 01:56;everywhere, which causes warnings but no error. The others run into expansion issues. If you tell us why you want to do this, we may be able to be more helpful. Not that you can't make this work, but it will probably be more trouble than it's worth. – cfr Nov 18 '23 at 02:40