You can make literally any set into an indifference curve of a "well-behaved" (complete, transitive, reflexive) preference relation.
Let $H \subset \mathbb{R}^n$.
Assume that the preference relation $\preceq$ is such that
(i) for all $x,y \in H$ we have $x \sim y$
(ii) for all $x \in H$, $y \notin H$, we have $x \not\sim y$ (meaning $x \succ y$ or $x \prec y$, the same for all $y \notin H$).
(iii) $\preceq$ is well-behaved on $\mathbb{R}^n \setminus H$.
A simple way to guarantee (iii) is to assume for all $x,y \notin H$ we have $x \sim y$.
Then $H$ (whatever shape it may have) is an indifference curve of $\preceq$.
Such a $\preceq$ may also be represented by a utility function $u$:
$u(x) = 0, \ \forall x \in H$
$u(x) = 1, \ \forall x \notin H$.
Note that this $u$ is not continuous, but you did not require that. For closed sets $H$ it can be made continuous, by setting
$u(x) = \text{distance}(x, H)$.