At first you can collect a certain sufficient number of well known flavours or perfumes and, in case they are mixtures, identify the major components.
Than you start to locate each of them in a category or class. Forget looking for functions like alcohols, or ketones and as such. The reason is clear already from your question.
An exception can be esters. Esters in my opinion can be a class as for they occur simply as they are in many fruits and spices.
A class will surely be that of terpenes and terpenoids, etc.
I said "Etc" but right now, writing, no other possible broad classes come to my mind except aromatics.***
Contrary to the believe of many, aromatic have/had indeed connection with aroma (spice in latin) and a somewhat nice perfume (up to taste. Benzene has a nice and particular odour, at least to me and surely to those that realised that several good smelling compounds had the benzene motif in them). In other words aromatics to indicate molecules containg the benzene ring preceded the concept of aromaticity as intended in a Kekulè or QM sense.
Adapted from my notes:
Isoprenoids are unsaponificable lipids formally constituted by isoprene units.
Note that isoprene is not a biological intermediate and is not the monomer from which terpenoids are formed in nature.
(Even isoprene such as natural rubber do not derive from isoprene polymerisation).
The biological precursor parent term of these compounds is mevalonic acid
Isoprenoids are divided in:
Often they are not exact multiple of isoprene but rather possess functionalization.
Terpenes and camphors are often perfumed or peculiarly and strong smelling compounds extracted from plants (roots, flowers, etc.).
Few terpenes can be found in animals as well.
On the contrary, steroids are ubiquitous in animals but rarely found in vegetalia.
Camphors and terpenes go under the name of terpenoids. Their distinction is however not sharp. Generally enough camphors are solid while terpenes are liquids prone to resinification and decomposition if exposed to air.
A well known essence is that of trementine. Already known to the ancient Egyptians is obtained from pine trees family. The resin from the trees when distilled in vapour stream gives a mixture of volatiles alpha- and beta-pinene, trementine which is used as solvent, and a solid C20 residue named colophony.
(Interesting note. Alpha-pinene occurs in its (+) form in trees from North America, while its (-) form is in European trees).
The isoprene unit C5H8 was discovered in 1918. Its structure was clarified two years later. The distinction between HH and HT polymers was made much later in 1953.
The classification is by
acyclic OR cyclic nature of the system
number of terpenic units (5, 10, 15 ,...)
As in my notes, the link contains several example of cyclic and acyclic monoterpenes, diterpenes, and so on.
I want to mention Ascaridole as it is one of the rare natural peroxides.
Other example worth mentioning are retinal, squalene, beta-carotene, as well as that chlorophyll contains terpenic parts.
Amongst polyterpenes a notable example is ubiquinone, involved in the last step of cellular respiration.
My notes have a passage pointing out the importance of terpenoids as flavours and perfurmes as well as the importance of their structures in mechanicists and theoretical aspects (Mirvan Wagner rearrangements of carbocations and stereochemistry).
Getting more strict on nomenclature:
As for a number of natural substances are around since long time, most have common names that are still in use (sometimes and in niche environments alongside wrong chemical structures!). As not only with terpenoids, these common names must be memorised. Unfortunately the task is complicated by the fact that the same molecule can have different names.
Confusion arises even in systematic approach as for two numeration systems are in use, a common or traditional and the IUPAC one.
Here the notes refer to decaline numeration as examples.
Following there are numerous examples of terpenes with interesting properties but wrong names still recurring in the literature. The correct or acceptable versions is given alongside. To resume this part of the notes is a task that I cannot effort here. Unfortunately my note are in my mother tongue and I cannot post so much photographs of the xerocopies (IUPAC) attached to them.
This is why I like technology. Without it, no Chemistry SE and no way to link to https://goldbook.iupac.org/T06279.html and links therein.
Likely this resume has the only merit to show that a clear classification is complicated in itself.
I try to suggest what I would have done as a student, without trying to invent a new classification or so. If I would have to do it now and professionaly, than I would surely have input on what exactly looking for to improve an already in use classification.
Let me think Apple. I Google to find . ...... googling right now. .....
..... a nice link from which at least we know that several esters are responsible for the fruity part of apple flavour. I definitely choose the wrong fruit as each of the ester is described by a prevalent note of a different fruit.
It is a good starting point. The esters category of your classification contains already a good half dozen of esters.
Let me think of ginger, and I do the same as before. ...
And we now have example of terpenoid to be classified according to cyclic, number of isoprene units and details.
For instance Zingiberene is a monocyclic sesquiterpene.
You can also see molecules which could go to a class Phenols, indeed aromatic, as gingerol.
And so on.
***The above occurrence of a phenol makes me think that phenols could be a class in your classification. Not really flavours in a candy oriented sense but surely responsible for stringent and or bitter taste in green tea, wines, apples, the ginger from which the idea came from, etc.
Quite a lot of work, but I do not see how else to proceed on reasonable chemical bases.
Another possibility, inspired by the "by function (bulk support or energy stock)" classification of polysaccharides, could be that of classifying molecules for their predominant taste, like bitter, sweet, sour, etc.
This makes sense too, and it can be even more functional depending on the interest of you as compiler. If I would have to start my own production of charms and candies, I would perhaps proceed this way. Perhaps expanding the 5 tastes (umami?) in something more detailed or restricted (fruity, pungent etc.). This can be even more chemically chaotic. But the categories will be self explanatory.
Edit just after posting. In line with the final part of my answer (a "flavour carried" based classification) is the answer by @flurbiprofen. I invite you to refer to it for such a functional classification based on gustative and or olfactory factors.