Yes, there are phases of matter that correspond to your question that exist inside neutron stars and are known collectively as nuclear pasta.
The inner crust of a neutron star has densities $>4 \times 10^{14}$ kg m$^{-3}$ and consists of a lattice of extremely neutron-rich nuclei, surrounded by degenerate gases of neutrons and ultra-relativistic electrons that behave like fluids. The equilibrium composition and structure is found by forming the sum of the energy densities of these components and then minimising it with respect to the number densities of the nuclei, neutrons and protons, and the numbers of neutrons and protons in the nuclei, subject to baryon and charge conservation.
The energy density sum must include the rest mass energy of the nuclei, which is a function of the number of protons and neutrons, their binding energy, plus modifications that account for the presence of the neutron fluid surrounding the nuclei that reduces the surface energy term, and a negative term due the binding energy of the nuclear lattice.
Above densities of $\simeq 3\times10^{16}$ kg m$^{-3}$, nuclei probably
start to lose their separate identities and spherical nature, forming
elongated rods or planes of nuclear material -- nuclear pasta.
Initially the nuclei are thought to group into "spaghetti" and then
into "lasagna", where the sauce is provided by the gaseous free
neutrons. As densities exceed $10^{17}$ kg m$^{-3}$, it is thought these
roles reverse; the gaseous neutrons form into spaghetti like structures
surrounded by nuclear material and then finally, shortly before
dissolution, the crust consists of nuclear material enclosing spherical
bubbles of neutron gas.
Here is a schematic picture, due to Newton et al. (2011) that shows how the pasta phases develop with increasing density. As I show in some more detail below, the departure from an ordered lattice of spherical nuclei is expected to occur when the nuclei fill more than abut 1/10 of the volume.
A few details
An approximate understanding of the process arises by considering the
Bohr-Wheeler condition for the fission of nuclei.
$$
E_{C}^{(0)} > 2 E_S\, ,
$$
where $E_{C}^{(0)}$ is the self-Coulomb energy of the nucleus and $E_S$
its surface energy term. When the Coulomb energy of the nucleus
satisfies this inequality then it becomes energetically feasible for
the nucleus to split.
$$
E^{(0)}_{C} = \frac{1}{4\pi \epsilon_0} \int_{0}^{r_N} \frac{q(r)}{r} \,
dq \, ,
$$
where $r_N$ is the nuclear radius. If we assume the total charge $q=Ze$
and the charge (due to $Z$ protons) is spread uniformly in the nuclear
volume, such that $q(r) = Ze(r/r_N)^3$ and hence $dq = 3Ze
(r^2/r_{N}^{3})$, then this integral shows that $E^{(0)}_{C} =
(3/5)(Z^2e^2/r_N)$.
However, in terms of the energetics of the gas as a whole, the nuclei
are not isolated, but sit in a neutral Wigner-Seitz sphere, accompanied
by $Z$ electrons distributed pseudo-uniformly, where $q_e(r) = -Ze(r/r_0)^3$, is the charge distribution of the
electrons, and $r_0$ is the radius of the neutral Wigner-Seitz sphere. From this, it can be shown that the total Coulomb energy is
$$
E_C = \frac{Z^2 E^2}{4\pi \epsilon_0}\left( \frac{3}{5r_N} +
\frac{3}{5r_0} - \frac{3}{2r_0}\right)\, .
$$
If we write the fraction of the volume occupied by the nuclei as $f =
(r_N/r_0)^3$, we can rearrange this to give
$$
E_C = E_{C}^{(0)}\left( 1 - \frac{3}{2} f^{1/3} \right)\, .
\tag{1}
$$
Now, since $E_{C}^{(0)} \propto Z^2/r_N$ and $r_N \propto A^{1/3}$, where $A$ is the number of nucleons in each nucleus, then
for a certain value of $Z/A$, the Coulomb energy per nucleon $E_C/A
\propto A^{2/3}$. The surface energy term is proportional to the area
of the nucleus, so $E_S/A \propto A^{-1/3}$. If we minimise the sum
of these two terms with respect to $A$ as follows
$$
\frac{\partial (E_{\rm tot}/A)}{\partial A} = \frac{\partial }{\partial
A} \left( \alpha A^{2/3} + \beta A^{-1/3} \right) = 0\, \,
$$
where $\alpha$ and $\beta$ are just arbitrary constants of proportionality, then
solving this gives $2\alpha A^{2/3} = \beta A^{-1/3}$ and hence $2E_C
= E_S$ at equilibrium.
If we put this into the Bohr-Wheeler condition and use
equation (1) for $E_C$, then we find that $f > 1/8$. In
other words the nuclei become unstable to fission and deformation once
they fill about one tenth of the total volume, which corresponds to densities
of $\sim 3 \times 10^{16}$ kg m$^{-3}$.