I wanna have a scene where the protagonists see the gray goo excreting human skeletons because they can't use the calcium in them for anything. But is this true? Would a self-replicating machine regard any chemical elements as truly "useless" to its goals, or would it endeavor to disassemble atoms and molecules that aren't immediately useful into ones that are? My guess is that it's not worth the extra energy to try and process atoms of one element into another until you've truly run out of other sources of that element you can easily harvest, but I'd like your opinions, as well as input from anyone who knows what useful purposes calcium might serve to such a machine.
Why Nano-Machines Can't Eat EVERYTHING Lets look at a real-world example of self-replicating nanobots: bacteria. A bacterium is a self-replicating nano-machine. And literally every surface in the world is covered in them. A bacterium obviously can't convert some materials into more bacterium. Bacteria can't metabolize sand, dirt, dust, or metals. A highly advanced nano-machine wouldn't be any different. Perhaps they'd be more efficient than bacteria, but they couldn't metabolize EVERYTHING. It takes energy to metabolize stuff, and if they're going to reproduce quickly they're going to focus on metabolizing what's easiest: organic matter. Even if it were possible to convert sand into nano-machines, it'd require a TON of energy. Solar-powered nanobots that eat through sand would be cool, by they'd take centuries to convert a desert into grey goo.
The Solution Instead of turning the entire world into grey goo, have them convert living things into the grey goo, chewing up plants, animals, and people with reckless abandon, spitting out the bones only. But don't make it happen quickly. Have the nano-machines spread like rot, slowly grinding the world into dust.
Now THAT is a truly terrifying apocalypse.
Anions and Cations
Calcium, like Sodium and Potassium, are encountered in solution (e.g. in vivo) usually as ionic forms (Ca+, Na+, K+, Cl-) that can selectively pass through a barrier following its electrochemical gradient. This process, known as chemiosmosis, can (and does in biological systems) drive potential voltage differences, thus offering a potential for energy generation.
Whether you are talking about self-replicating biological systems (catalytic RNA, etc) or those in silico, there is no implication of intelligence or intent on the part of the replicator, but instead it is driven by chemical, physical, or biological imperatives. That is, simple self-replicating machines often operate according to the laws of physics and chemistry, and intelligence isn't assumed and therefore wouldn't necessarily "regard" anything nor even have "goals" as such.