Like carbs, heavy metals aren't entirely "bad for you." This article is a brief on the what & why of heavy metals, and a little on how they're communicated on your food labels.
(1) Metallic elements,
(2) Of a high atomic weight; a density at least 5 times greater than that of water.
There lies the technical definition of a heavy metal. 
Heavy metals are perceived with an assumption that heaviness and toxicity are inter-related.
However, heavy metals can also be essential nutrients – required for various biochemical and physiological functions. An inadequate supply would result in a variety of deficiency diseases or syndromes, or at least, a less than optimal quality of health. 
Some examples of essential heavy metals include:
Some metals are essential to the extent of required labeling on Nutrition Facts Panels (NFP):
(Note: NFP compliance effective 2020)
You can click here for a description of function, dietary reference intakes (DRI values), food sources, and adverse effects of excessive consumption unique to these elements.
Elaborating on the topic of elements, below is an image of the Periodic Table. Metals, metalloids, and nonmetals have been color-coded for ease in differentiating element classification. The yellow-shaded portions represent those elements (regardless of metal, metalloid, or nonmetal) that are naturally-occurring in food products, some falling under "ash content," more specifically, "minerals" on a Nutrition Facts Panel.
Figure 1. Periodic Table of Elements, The Elements in Food
Many (of the yellow-shaded elements) are optional for the manufacturer to list, but all are identified on the FNB's Dietary Reference Intake resource. The elements: Boron, Silicon, Nickel, Vinadium, and Arsenic do not have RDA nor AI values. These values are not determinable due to lack of data of adverse effects and concern with regard to lack of ability to handle excess amounts. However, it is noted the source of intake should be from food only to prevent high levels of intake .