I presume that by "harmful" in this context, you mean some toxic effect when eaten. Toxic effects are caused by interaction of that the chemical has with various vital parts of the human body. This can potentially include a large number of chemical compounds. Categories include hormone analogs like BPA (bisphenol A), neurotransmitter analogs like organophosphate nerve gases, metabolic blockers (carbon monoxide, cyanide, nitrophenol), ion channel blockers (digitalis glycosides, tetrodotoxin), protein-binding heavy metal ions (arsenic, mercury. lead etc) and many, many more.
So, I think the question is phrased in a confusing way. I think you are being asked to generate a list of tools that might be used by a forensic or food scientist to identify components of food. This clearly involves two steps: separation and identification. The separation methods include extraction: liquid-liquid partitioning between an organic and aqueous phase is common for organic molecules (often with the pH of the aqueous phase adjusted), chelation to remove ions (e.g. EDTA to remove chromium) and a host of chromatography methods: liquid on solid, gas chromatography, High Pressure Liquid Chromatography. Once components are separated, there are many identification methods: specific chemical tests ((Marsh Test for arsenic, prussian blue test for cyanide, Meixner test for amanitin), nuclear magnetic resonance spectroscopy, mass spectroscopy, light absorption spectroscopy (IR, UV). The separation and identification steps are sometimes combined (HPLC or GC with mass spectroscopy).
Because food is a pretty heterogeneous mixture of chemicals that we have proven don't generally cause harm, you would have to compare your results of separation and identification with a database of harmful chemicals. It would still be difficult since there are some "harmful" constituents of normal foods present in sub-toxic amounts (e.g. hydrogen cyanide releasing chemicals in peach pits and apple seeds, arsenic in rice) and some people are sensitive to normal food constituents (e.g. food allergies, people with genetic glucose-6-phosphatase deficiency develop hemolytic anemia from eating fava beans, chemicals in raw navy beans (lectins) bind proteins causing gastrointestinal toxicity).
Hope this lengthy diatribe helps (I am a physician and former organic chemist).