Is it possible to construct a $p$-adic numbers out of $\mathbb{Z}[[x]]$ like we can for the real numbers? I saw this question earlier today about the $p$-adic numbers generally and am trying to figure out how to visualize them or construct an algebraic entity with the right structure.

There's a straightforward way to build the real numbers out of formal power series in $\mathbb{Z}[[x]]$. Is there a way to do a similar thing for the $p$-adic numbers?
The intuition is that we are considering generalizations of infinite decimals $123456.123123\cdots$, but we only have a single decimal place to the left of the decimal point, and we allow any integer to appear in any decimal place.
I'm defining a notion of normal form to capture the fact that some-but-not-all formal power series converge when evaluated at $\frac{1}{10}$, without circularly assuming that those sums converge to a real number. The normal form for a given real isn't unique, $1.3$ and $1.299999\cdots$ are the same number. Note that in the example below $a_0$ is unconstrained.
$$ \sum_{i=0}^{\infty} a_ix^i \;\; \text{is in normal form} \;\; \textit{if and only if} \;\; \text{$0 \le a_i \le 9$ for all $i \ge 1$} $$
Let's define a relation $R$ as follows
$$ \left(\left(\sum a_i x^i \right), \left(\sum b_i x^i\right) \right) \in R \\ \textit{if and only if} \\ \text{there exists a $k$ such that $10a_k + a_{k+1} = 10b_k + b_{k+1}$} \\ \text{and all indices besides $k$ and $k+1$ are the same. } $$
Let $\simeq$ be the transitive, reflexive, symmetric closure of $R$.
If we consider only the formal power series in $\mathbb{Z}[[X]]$ that are equivalent to a power series in normal form, and then take equivalence classes mod $\simeq$, then we have a field isomorphic to the real numbers $\mathbb{R}$.
We can also define orderings on this structure.
$$ \sum a_i x^i \;\; \text{is non-negative} \;\; \textit{if} \;\;  \text{$\sum a_i x^i$ is in normal form and $a_0 \ge 0$} $$
$$ \sum a_i x^i \;\; \text{is non-negative} \;\; \textit{if and only if} \;\;  \text{$\sum a_i x^i$ is equivalent to a non-negative series in normal form} $$
And then the definition of $\sum a_i x^i \le \sum b_i x ^i$.
$$ \sum a_i x^i \le \sum b_i x ^i \;\; \textit{if and only if} \;\; \sum (b_i-a_i)x^i \;\; \text{is non-negative} $$

Is there a way to do something similar for the $p$-adic numbers?
 A: "Decimal expansion" happens to be the/a correct way to view $p$-adics, and power series in particular are a good way in. Intuitively, one can think about $\mathbb Z_p$ as series which look like
$$\sum_{k=0}^\infty a_kp^k,$$
where $a_k\in[0,p)\cap\mathbb Z.$ The $a_k,$ then, are more or less digits in base-$p.$ This should look familiar: if you put $p=\frac1{10}$ into these series, you will recover $\mathbb R.$
However, the caveat here is that we have allowed this to be an infinite series when it certainly does not converge in any meaningful way in $\mathbb R.$ This is not a problem: we don't live in $\mathbb R$ anymore because we live in $\mathbb Z_p,$ and convergence is different in this universe.
Let's be a bit more formal. As suggested, let's take two power series $a(x),b(x)\in\mathbb Z[[x]]$ and ask when they should give the same element of $\mathbb Z_p.$ For concreteness, we'll write
$$a(x)=\sum_{k=0}^\infty a_kx^k,\qquad b(x)=\sum_{k=0}^\infty b_kx^k.$$
To test equality, what we want to do is test$\pmod{p^N}$ for increasingly large $N.$ That is, if
$$\sum_{k=0}^\infty a_kp^k\equiv\sum_{k=0}^\infty b_kp^k\pmod{p^N}$$
as $N\to\infty,$ then we'll have the corresponding elements of $\mathbb Z_p$ be equal. However, these series are only defined formally, so how should we check$\pmod{p^N}$? Well, there's no reason to check elements past $k\ge N$ because they don't add any modular information. So we might as well check if
$$\sum_{k=0}^Na_kp^k\equiv\sum_{k=0}^Nb_kp^k\pmod{p^N}$$
as $N\to\infty.$ Now that we have finite sums, this notion of equality potentially makes more sense and can be made rigorous.
Anyways, the point is that, yes, we can think about $\mathbb Z_p$ as power series in $p.$ This can even be made rigorous, for $\mathbb Z_p\cong\mathbb Z[[x]]/(x-p).$
