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.