I picture light ray as a composition of photons with an energy equal to the frequency of the light ray according to $E=hf$. Is this the good way to picture this? Although I can solve elementary problems with the formulas, I've never really been comfortable with the idea of an object having or being related to a "frequency". Do I need to learn quantum field theory to really understand this?
All you need is quantum mechanics, i.e. that nature in the microcosm is dual,sometimes it can manifest wave properties and sometimes particle properties.
It depends on the measurement/experiment if the wave or the particle nature will manifest itself. Electrons manifest this duality: in the two slit experiment their wave nature appears governed by the de Broglie wavelength. Photons do the same too, displaying the wavelength/frequency associated with the collective classical electromagnetic wave.
The classical electromagnetic wave is built out of photons in a consistent way, and you could study this link if you are interested in this more complicated problem.
It is the quantum wave field $\psi$ (probability amplitude) for a particle which may have oscillations. So for a wave pulse advancing smoothly in some direction the oscillations inside the pulse correspond to the photon frequency and wavelength meanwhile the general movement of the pulse would be associated with the smooth movement of the particle. quite different. So the photon itself doesn't wiggle with the photon frequency, just the underlying abstract quantum field used to describe where we can find it.
Feynman said wave particle duality and quantum mechanics are very difficult to fully comprehend but we have to somehow get to grips with the dilemmas as the quantum mechanics results are outstandingly correct and accurate.
I like what Juliana Mortenson discovered. She proposed that Planck originally derived the energy equation as E = h * measurement interval * f. In later papers, Planck "assumed" the measurement interval to be 1 second to correspond to the dimensions of frequency and then attached it to h so that units of h became joules-sec. Originally though, h should have had units joules/osc with measurement interval in sec and frequency in osc/sec. If you use this logic, every single wave of light has energy h in joules. Over 1 second, you would get E=hf, as expected.
Note that in modern physics, the units of f were changed from cycles/sec to 1/sec to satisfy E=hf. Makes no sense.
With E=hft, it is easy to see why ultraviolet light with its higher frequency has more energy in one second than infrared with its relatively lower frequency. It is also easy to determine the mass and momentum of a single wave of light.
I studied physics and electrical engineering years ago (1970s). This correction to Plancks constant makes sense to me. However, someone with current credentials and access to Planck's early papers needs to check this out. I believe this is very important and should be either exposed as a hoax or trumpeted as a breakthrough that possibly addresses Einstein concerns about hidden variables.