Suppose I have water that was cooked with non-kosher food. I then take the water and distill it.
Would this water be considered permissible to drink?
This answer is going to need some background knowledge of bittul (nullification). This will be very much oversimplified, but enough for our purposes, I think.
Min BeMino - a mixture of the same types of food. In this case the prohibited substance (the 'issur') is batel if it is in the minority (rov). The rabbis enacted a restriction (gezeira) not to eat the mixture until the issur is less than one 60th of the total (shishim).
Min BeSheEino Mino - a mixture of different types of food. Here, the issur is batel if it no longer imparts flavor (noten taam). To determine this, one would have to have a "chef" (kefeila) taste the food to determine if the flavor is there. Since this is not always practical, and we assume we are not experts at 'tasting', we wait until shishim and then assume the flavor is gone, unless it's a very flavorful food (tavlin) when we usually assume you are just stuck.
(There are way too many sources, but see the Taz YD 98:3 for a similar, succinct, and good enough summary)
Some issurim have special rules, as outlined below, as applicable.
To deal with the question fully, I have to look at different kinds of issurim.
First let's assume a standard issur that has no water content, eg. Chelev - forbidden fats (I assume these are 100% lipid. Biologists may correct as neccasary, but it's more about the principle of the matter anyway).
Distillation, would pull out all of the water, and leave the taam behind. So, assuming you couldn't taste the fat in your distilled water, it's fine. Presumably the worry about the quality of our taste buds is irrelevant when we can scientifically say that no taste remains. If you think taste might remain, well, then you've got a problem with your water.
Now let's assume we have a standard issur that contains water (eg. Neveila -- forbidden meat). After distillation, we have a mixture of our standard water and the meat-water. So we have min bemino, and we follow the rov while rabinnicaly we require shishim. If you have 60 times as much water as meat, then you are for sure OK. If not, then you would have to evaluate how much water is in the meat, and take 60 against that. This can be hard to do, so we try to avoid doing it and usually just assume it's not kosher.
Some issurim require numbers more than sixty on a rabbinic level (eg. terumah at 100; orla and kilaei hakerem at 200). These would then fit, as above, but with the numbers adjusted to their respective amounts.
Some issurim are not batel "even in 1000." These include davar sheyesh lo matirin (something that can be made permissible in a different way) such as chadash or muktza. So in our case, either you say that indeed it is never batel, and if there is any water content in the issur then all the water is prohibited, or you draw a distinction similar to those given regarding chametz in tap water (see: tap water on Pesach).
The questioner refered specifically to a comment about rainwater. Since the majority of the water in the world is permitted, we can say "kol deparish, meiruba parish" (whatever comes out of a mixture, came from the majority) and thankfully permit all rainwater for consumption without worry of its previous culinary uses.
Basically yes, though milk&meat may be the exception.
I heard Rabbi Hershel Schachter call this a question of efshar lehasiro, quoting Rabbi Soloveichik. IIRC the Gemara discusses roasting some meat where the fat and blood drip to the bottom; then if you know just the right amound of salt to add, you can pull out one and leave the other. (Something to that effect, I'm hazy, sorry.)
While we discuss the question of efshar lesochato (and generally conclude that's no good), that means: take a potato, cook it in ham juice; then put the potato in a giant vat of water and cook it there for several hours. Can you ever diffuse enough out of the potato that we can now kasher the potato? Generally not.
But if we can perfectly chemically separate the two, that's a different story.
Milk & meat is a weird one because you took two kosher ingredients and now the mix is 100% non-kosher; IIRC Rabbi Schachter quoted Rabbi Soloveichik that in theory even there, perfect chemical extraction would suffice.