I found my old notes from the times when I was healthy. Its a list of foods and the minerals, vitamins they contain.
Magnesium: Brown rice, beans, oatmeal, bananas, leafy greens, peanuts
Phosphorus: Peas, lentils, avocado, spinach, vegetables in general
Potassium: Raisins, bananas, kiwi...