Chemistry - Conversion atom to another
Solution 1:
I think you are looking for nuclear transmutation which occurs via nuclear reactions or radioactive decay, as explained in the referenced wikipedia page. As you can imagine then, implementation has some important impediments.
Solution 2:
Someone has done what the child suggested. Sorta.
First, some background.
What you're talking about is called transmutation, and for thousands of years it drove nearly all of humanity's research in chemistry (which was called alchemy at the time).
The alchemists' dream of turning "base metals" like lead into gold was handily crushed when modern chemistry was being developed in the victorian era, and it was found that chemical elements were just that: elements. Indivisible.
As knowledge grew and electrons, protons, and neutrons were discovered people still thought that transmutation was simply too difficult to actually pull off. Sure, nuclei could change on their own - people knew about radioactive decay - but it was thought that this process could not be affected from the outside. Intentional transmutation was still largely considered impossible. Then someone did it.
In 1934 Irène Joliot-Curie (Daughter of Pierre and Marie Curie) transmuted one element into another for the first time. Shortly afterwords the Manhattan project got started and transmutation became indispensable.
Transmutation in Your Life
Elements made by transmutation are used in hundreds of ways in modern life, the smoke detector above your head uses 241Am made in a nuclear reactor, the dye used in a PET scan has 18F as an active ingredient, and 239Pu and 233U nuclear fuels are made from 238U and 232Th respectively. Some gunsights even use tritium lighting. These are all examples of bulk materials made by transmutation.
Alright, Here's Where That "Sorta" Comes In
Transmutation has one inherent problem that renders that 'turning harmful stuff into harmless stuff' plan moot.
Transmutation is extremely messy.
These nuclear reactions are less like chess and more like the game risk. Sure, one outcome might be more likely, but not by much - and plenty of other outcomes will also occur. It's impossible, on a fundamental level, to narrow the outcome of one of these reactions. Additionally, you can't make it happen for all of the atoms at once; some atoms will react before the others and if you wait too long the ones that reacted first start doing more reactions in the background.
Remember that 241Am in your smoke detector? Well in order to make it you take 239Pu (which you need a different reaction to make in the first place but let's ignore that for now) and throw neutrons at it. Eventually, it'll catch one and either fission (split) or become 240Pu. If that 240Pu then absorbs another neutron before it happens to decay, you get 241Pu.
All of this happens spread out over some time, with some atoms going from 239Pu all the way to 241Pu in a fraction of a second by just happening to catch two neutrons in a row without fissioning and others will just happen not to have caught any neutrons at all. Some will even go farther, and one of those 241Pu atoms could absorb another neutron and either fission or become 242Pu.
And after all that, you still don't have 241Am! How do you get it? You wait. Over time, 241Pu slowly decays into 241Am. 241Pu has a half-life of 14 years, so after only a few years a sizable amount of the 241Pu will have turned into 241Am. They're still mixed though, so the final step is to chemically separate them.
Congratulations! Finally, from your starting 239Pu you've made a little 241Am! Also some 240Pu, 241Pu, 242Pu, various decay products, and a mess of fission-fragments!
So while nuclear transmutation is used to make plenty of substances that are indispensable to modern western civilization, it can not be used to change a sample of one element completely into another with no side products.
Solution 3:
While what you suggest may sound nice on paper, it has some serious problems.
- Getting the elements. Let's say that we're talking about purifying water to remove toxic elements such as Hg or Cd. Extracting the elements out of the water is a feat by itself, for example using reverse osmosis methods. This is a method used for seawater desalination - to turn them from salt water filled with all kinds of elements into drinkable water. This process is very expensive, and a very polluting one as well. Desalination just the amount of water you need for drinking water is complicated, so desalinating an entire reservoir is simply not going to happen.
- Let's say you did somehow manage to extract the element in question. Now you need nuclear reactions to transmute one element to another. Not all are possible. For some elements, like Tc or Am this is the only way you can produce them. However, you are going to end up with radioactive nuclear waste.
To sum it up, even if it was possible, you would need so much power and to do it and you will produce some much pollution that it's simply not worth it. Just going and mining the gold will be orders of magnitude cheaper (and probably cleaner) than producing it using nuclear reactions.
If you do manage to somehow extract the the polluting elements, you usually do something else with them (aka recycling) and you do not attempt being an alchemist. Another example is soils contaminated with lead. The solution is to just dig it up, put it somewhere where it is not hazardous to anyone and replace it with clean soil.