So many types of mining have loads of fluoride or heavy metals to discard. Since we’re dealing with minerals, in some cases visual inspection & sorting is sufficient. In other cases where high purity is required, may need to dissolve/melt them and process a series of precipitates & evaporates (i.e. expensive).
Here’s a fertilizer example: https://pubmed.ncbi.nlm.nih.gov/21681395/
You can find similar articles just about everywhere there’s an NPK plant.
I know gypsum, aluminum, uranium are faced with similar obstacles. Google if you want details. (I do control systems if that helps.)