Let $y_1,\dots,y_n$ be integers.
Conjecture:$\;$There exists $f\in\mathbb{Z}[x]$ such that $f(i)=y_i$ for $i=1,\dots,n\;$if and only if $(i-j){\,\mid\,}(y_i-y_j)$ for all $i,j$ with $1\le j < i\le n$.
I can prove the forward direction . . .
Suppose $f\in\mathbb{Z}[x]$ is such that $f(i)=y_i$ for $i=1,...,n$.
For some nonnegative integer $m$ we can write $$ f=\sum_{k=0}^m a_kx^k $$ where $a_0,...,a_m\in\mathbb{Z}$.
Let $i,j$ be integers with $1\le j < i\le n$. \begin{align*} \text{Then}\;\;& i\equiv j\;\bigl(\text{mod}\;(i-j)\bigr) \\[4pt] \implies\;& i^k\equiv j^k\;\bigl(\text{mod}\;(i-j)\bigr)\;\text{for}\;0\le k\le m \\[4pt] \implies\;& a_ki^k\equiv a_kj^k\;\bigl(\text{mod}\;(i-j)\bigr)\;\text{for}\;0\le k\le m \\[4pt] \implies\;& \sum_{k=0}^m a_ki^k\equiv \sum_{k=0}^m a_kj^k\;\bigl(\text{mod}\;(i-j)\bigr) \\[4pt] \implies\;& f(i)\equiv f(j)\;\bigl(\text{mod}\;(i-j)\bigr) \\[4pt] \implies\;& y_i\equiv y_j\;\bigl(\text{mod}\;(i-j)\bigr) \\[4pt] \implies\;& (i-j){\,\mid\,}(y_i-y_j) \\[4pt] \end{align*} as was to be shown, which completes the proof of the forward direction.
For the reverse direction, I considered induction on $n$, but while the verification for the case $n=1$ is instant, I don't see how the divisibility conditions of the conjecture can be used to achieve the inductive step.
Looking at some special cases, it's trivial to show that the conjecture holds for the case $n=2$, and with a little more work, it can be shown that it also holds for the cases $n=3$ and $n=4$.
Potentially relevant is the answer by @Chrystomath to
$\qquad$ Interpolating polynomial with integer coefficients
which gives a divisibility criterion that is necessary and sufficient for the existence of a qualifying $f$.
However I don't see how that divisibility criterion is implied by the divisibility conditions of my conjecture.
So the question remains . . .
Is my conjecture valid?