Is every integral point of an arithmetic scheme contained in an affine open set? The schemes $$X = Proj \mathbb{Z}[s,t] = \mathbb{P}^1_{\mathbb{Z}}$$ and $$Y = Proj \mathbb{Z}[x,y,z]/(x^2 + y^2 - z^2)$$ both have isomorphic generic fibers as schemes over $\mathbb{Z}$, and there is a bijection on the $\mathbb{Z}$-points using the parametrization from stereographic projection. Both have infinitely many $\mathbb{Z}$-points.
Now if we decompose each scheme into affine patches in the standard way, we obtain $$X = Spec \mathbb{Z}[\frac{s}{t}] \cup Spec \mathbb{Z}[\frac{t}{s}]$$ and $$Y = Spec \mathbb{Z}[\frac{x}{z},\frac{y}{z}]/\Big((\frac{x}{z})^2+(\frac{y}{z})^2 - 1\Big)$$ $$\cup Spec \mathbb{Z}[\frac{x}{y},\frac{z}{y}]/\Big((\frac{x}{y})^2+1-(\frac{z}{y})^2\Big)$$ $$\cup Spec \mathbb{Z}[\frac{y}{x},\frac{z}{x}]/\Big(1+(\frac{y}{x})^2-(\frac{z}{x})^2\Big)$$.
However, both affine patches of $X$ have infinitely many $\mathbb{Z}$-points, but each affine patch of $Y$ has only finitely many. So much for the pidgeonhole principle!
This raises the question: if $X$ is any arithmetic scheme (say just finite type over $\mathbb{Z}$), is the image of every integral point $\mathbb{Z}\to X$ contained in an affine open $U \subset X$?
I am also very much interested in the answer to the more general question of whether the image of $Spec(\mathcal{O}_K)\to X$ or $D\to X$ is contained in an affine open, where $\mathcal{O}_K$ is the ring of integers of a number field, and $D$ is a Dedekind scheme. If this fails to be true, under what conditions will a given $D$-point be contained in an affine open?
It almost seems like Siegel's theorem plus quasicompactness would give a negative answer to the question on $\mathcal{O}_K$-points, but it wouldn't, as illustrated in the example above.
 A: I'm not sure this constitutes a full answer, but I can certainly give you an instructive example.
Example. Let $R$ be a Dedekind domain, and consider $\mathbb P^1_R \to \operatorname{Spec} R$. Then a section $\operatorname{Spec} R \to \mathbb P^1_R$ is given by a very ample line bundle on $\operatorname{Spec} R$. Any line bundle can be represented by a fractional ideal $I \subseteq K$ (where $K$ is the fraction field of $R$); wlog we may assume that $I \subseteq R$ is an actual ideal.
Conversely, every line bundle is ample because $R$ is affine (recall that ample is an absolute notion, whereas very ample is a relative one). Hence, some power $I^n$ is very ample. Because $R$ is a Dedekind domain, the ideal $I^n$ can be generated by $2$ elements, so it defines an embedding
$$\operatorname{Spec} R \to \mathbb P^1_R.$$
If moreover $I$ is torsion (this is always the case if $R$ is a number ring), then we can choose $n \gg 0$ such that $[I^n] = [I]$. We conclude that any torsion fractional ideal is very ample.
Question. Does such an $R$-point of $\mathbb P^1_R$ always have to land inside an affine open?
Lemma. Let $R$ be a ring, and $\mathscr L$ a very ample line bundle on $\operatorname{Spec} R$ (relative to $\operatorname{Spec} R$). Then the embedding $i \colon \operatorname{Spec} R \to \mathbb P^1_R$ lands in an affine open if and only if $\mathscr L = i^* \mathcal O(1)$ is torsion.
Proof. If $\mathscr L^{\otimes d} \cong \mathcal O_{\operatorname{Spec} R}$, then there exists a nowhere vanishing section $g \in \Gamma(R, \mathscr L^{\otimes d})$. This comes from a section $f \in \Gamma(\mathbb P^1_R, \mathcal O(d))$, and the image of $i$ must land inside $D_+(f)$.
Conversely, if $i$ lands inside the affine open $D_+(f)$ for some $f \in R[x,y]_d$ homogeneous of degree $d > 0$, then the image $g \in \Gamma(R, \mathscr L^{\otimes d})$ of $f$ is nowhere vanishing on $\operatorname{Spec} R$. Thus, $\mathscr L^{\otimes d} \cong \mathcal O_{\operatorname{Spec} R}$. $\square$
Thus, we see for example that for $R$ the ring of integers in a number field, every $R$-point of $\mathbb P^1_R$ has to land in some affine open (but we do not have a very effective way of finding this affine open: it involves computing the order of an element in the class group).
On the other hand, for $R$ the affine ring of an elliptic curve minus the point at infinity, there are many non-torsion line bundles, which correspond to sections that do not land inside any affine open.
Remark. It might be possible to reduce the general case of $X \to \operatorname{Spec} R$ projective to the case above (first reduce to $\mathbb P^n_R$, and then note that an ideal in a Dedekind domain is generated by two elements).
A: Here is Lemma 5.4.17 of Gabber, Ramero "Almost Ring Theory":

Lemma 5.4.17. Let $R$ be any ring, $X$ an open subscheme of a projective $R$-scheme. Then every $R$-section $\operatorname{Spec} R \to X$ of $X$ factors through an open imbedding $U \subset X$, where $U$ is an affine $R$-scheme.

