What is the precise formal correspondance between an oscillator and a quantum field? A common route of introduction to quantum field theory is to note a similarity between the mathematical structure of a quantum harmonic oscillator and of a quantum field "at a point". The quantised spectrum of the harmonic oscillator is used to motivate 'particle quanta' in the quantum field.
Despite reading several expositions of this process I am not clear on exactly how the structures are equivalent.
I am fully aware nothing in the quantum field is 'really' oscillating (at least not that is described by this correspondence). It is a completely formal correspondence. Therefore this question is purely mathematical and does not attempt to include an interpretation or physical aspect.
One way of formalising the quantum harmonic oscillator is
$$i\hbar\frac{\partial}{\partial t}\psi=\hat H\psi=\left(\frac{\hat p^2}{2m}+\frac{1}{2}k\hat x^2\right)\psi=\left(\frac{\hat p^2}{2m}+\frac{1}{2}m\omega^2\hat x^2\right)\psi$$
I have seen it stated this is equivalent to the Klein-Gordon equation
$$\left(\square+m^2\right)\psi=0$$
My current progress is realising the time part of the d'Alembert operator matches the time part of the oscillator, likewise for the space part and the momentum, and the mass term and the position.
Assuming that is correct, here is my problem. The harmonic oscillator is solved to give further insight into quantities already present in the equation (ie. values for the wavefunction with given positions and masses), it does not generate 'new' concepts. I am expecting something similar for the field case. 
I don't see how this can be possible though given the structure of the field system. It is the field "at a point" which I believe means a point in momentum space, ie. a plane wave, rather than a 'real space' point. If that's true then the momentum is fixed. The rest mass is also fixed since we are talking about a single quantum field, ie. of a single particle variety which has a given rest mass. Therefore the apparent mass, and the velocity and energy, in both classical and relativistic senses, are fixed. As a plane wave the phase, time shift and space shift can all be changed, but not independently, they are effectively the same parameter. The magnitude could also be changed but this is just a separate single value, it doesn't form a product or anything. Given the solution space is already constrained to two simple parameters I don't understand how there is enough space for anything interesting to develop as it does with the harmonic oscillator. Another way to put that is I don't understand the effect of the field ladder operators in terms of the quantities in the Klein-Gordon equation. (I am aware they "add a quantum of excitation / particle" but mathematically this is the definition of new terms rather than an explanation isn't it). It looks like a key difference is the field mass term which is just a constant compared to the position operator. Is this promoted to an operator?
It would be great if the answer could address what space the solutions of the field equation that generate particles live in, ie. analogous to the wavefunction space that the solutions to the harmonic oscillator live in.
Related to:
In what sense is a quantum field an infinite set of harmonic oscillators?
“QFT is simple harmonic motion taken to increasing levels of abstraction”
How to derive the theory of quantum mechanics from quantum field theory
Klein Gordon Field Quantization: why this is the correct way to express the field?
A question on using Fourier decomposition to solve the Klein Gordon equation
 A: I see two problems with your reasoning:


*

*The claim was never that Klein-Gordon field theory is equivalent to a single harmonic oscillator, but that it is equivalent to an (infinite) set of non-interacting harmonic oscillators with different frequencies.

*You seem to be looking for equivalence between quantum oscillator(s) and classical Klein-Gordon field. The real equivalence shows up between two classical theories, as well as between two quantum theories, but not between a classical and a quantum theory.


Let me now explain what people mean by this equivalence in the precise mathematical sense. For simplicity, let's compare two classical theories:
Consider the classical Klein-Gordon equation
$$ \left( \Box + m^2 \right) \phi = \left( \frac{\partial^2}{\partial t^2} - \Delta + m^2 \right) \phi = 0.$$
(In this answer, I set $\hbar = c = 1$ to simplify formulas as they usually do in QFT. Recovering the correct powers of $\hbar$ and $c$ should be straightforward.)
Now we will apply the Fourier transform to this equation. More precisely, let's search for $\phi(x)$ given by
$$ \phi(x) = \phi(t, {\bf x}) = \int \frac{d^3 p}{(2\pi)^3} e^{i {\bf p x}} \cdot \tilde{\phi}(t, {\bf p}) $$
for some function $\tilde{\phi}(t, {\bf p})$ called the Fourier image of $\phi(t, {\bf x})$. It always exists at least formally, because the Fourier transform is invertible.
You can see that the Klein-Gordon equation simplifies for $\tilde{\phi}(t, {\bf p})$:
$$ \left( \frac{\partial^2}{\partial t^2} + \omega_p^2 \right) \tilde \phi(t, {\bf p}) = 0, $$
where
$$ \omega_p = \sqrt{{\bf p}^2 + m^2}. $$
Please make sure that you can reproduce this equation by plugging in the Fourier transform formula in the Klein-Gordon equation of motion.
This equation of motion is equivalent to an uncountably infinite set of harmonic oscillators labeled by a 3-vector ${\bf p} = (p_x, p_y, p_z)$, and the frequencies of these oscillators are given by $\omega_p$. This is because the equations above (for different ${\bf p}$) are precisely the oscillator equation.
You can now recover the classical solution $\phi(t, {\bf x})$ for the Klein-Gordon field by substituting the solutions of oscillator equations in the Fourier transform integral. Note that different initial conditions for each of the oscillators become the field's initial condition.
The same logic can be carried out for the two quantum theories: the Klein-Gordon QFT versus the quantum oscillator. In fact, this is how Klein-Gordon theory is usually quantized in all introductory QFT books. This is not essential to understand the correspondence outlined above, so I'm skipping it here.
A: This answer is in thanks to Solenodon Paradoxus' brilliant answer. That answer has helped me to finally understand this problem. I just add this answer because that one was not in exactly the form I had in mind, so it might help other people who have this question. But it was that first answer that helped me have a breakthrough in my understanding so thanks again!
The answer itself in the format I had in mind
$$
\begin{matrix} {}
 &
\text{General version} &
\text{Oscillator version} &
\text{Field component version}
\\
\text{Equation of motion} &
\left( \frac{d^2}{dt^2} + \omega^2 \right)f(t)=0 &
\left( \frac{d^2}{dt^2} + \frac{k}{m} \right)x(t)=0 &
\left( \frac{\partial ^ 2}{\partial t ^ 2} + \mathbf{p}^2 + m^2 \right)\bar\phi_\mathbf{p}(t)=0
\\
\text{Second derivative term} &
\frac{d^2}{dt^2} &
\frac{d^2}{dt^2} &
\frac{\partial ^ 2}{\partial t ^ 2}
\\
\text{Zeroth derivative term} &
\omega^2 \text{ : angular frequency squared} &
\frac{k}{m} &
\mathbf{p}^2 + m^2
\\
\text{Independent variable} &
t &
t \text{ : time} &
t \text{ : time} &
\\
\mathrm{Dependent\,variable} &
f(t) &
x(t) \text{ : position} &
\bar\phi_\mathbf{p}(t) \text{ : stated below}
\end{matrix}
$$
$\bar\phi_\mathbf{p}(t)$ gives the amplitude (modulus of its complex value) and phase (phase of its complex value) of a component of the field with momentum $\mathbf{p}$, that is a plane wave in space having its wavelength and direction fixed by $\mathbf{p}$, at a given time.
Technical observations
The totally coordinate free Klein-Gordon equation does not treat time separately from spatial dimensions. However, the typical presentation of this equivalence does. Therefore, the following points need to be remembered:


*

*We only take the Fourier transform in the 3 spatial dimensions, not all 4 dimensions.

*Therefore, there is one remaining free parameter, time.

*Equivalently, we are dealing with the 3-momentum, not the 4-momentum.

*Therefore, selecting a momentum component by itself only constrains the solution, up to a phase and amplitude, at any point in time, but not throughout time.

*Therefore, choosing a momentum component by itself does not constrain the solution to be a plane wave in a spacetime sense.

*The transformed equation of motion constrains the solution to be a plane wave in a spacetime sense.

*Each solution has for each momentum component a single plane wave in a spacetime sense with non varying parameters. Equivalently, for each momentum component there are a family of plane waves in a purely spatial sense whose amplitude and phase do vary with time, as governed by the equation of motion.


Characterisation of the solution space (implication / interpretation)
The correspondence is between a component of specified momentum of a Klein-Gordon field and a harmonic oscillator. The momentum component is a spacetime plane wave with wavelength, direction and frequency fixed by the momentum, and amplitude, polarization and phase offset fixed by the overall field solution being Fourier transformed. The variable that varies with time is the amplitude and phase of the spatial plane wave that exists at each snapshot in time. The variable that varies with time in a harmonic oscillator is position.
This relationship is made less obvious, because the introductory case with a harmonic oscillator is one dimensional oscillation, which corresponds to linear polarisation, and the field component corresponding to the introductory case for a quantum field is circularly polarised, which corresponds to particles and no antiparticles. The field component can be linearly polarised, which corresponds to a standing wave, which corresponds to equal particle and antiparticle excitation for a quantum field. In this situation, the amplitude does exactly oscillate back and forth over time just as the position does in a harmonic oscillator. I don't know enough QFT to say whether this is a physically allowed state.
