When does metallic bonding occur?
I will explain all three bonding types, starting with metallic, in terms of difference in electronegativity and average electronegativity
Metallic bonding occurs at low electronegativity and low average electronegativity. Metallic bonds have delocalized electrons that can freely move. It means that the electrons are pretty much evenly shared between the atoms, but the pull/electronegativity is not very large. Thus, the electrons are pretty evenly shared, but can freely move.
Covalent bonds have low difference in electronegativity, but high overall average electronegativity. Thus the electrons are pretty much stuck in place, but are evenly shared.
Ionic bonds have high difference in electronegativity, thus one "steals the electron", and a medium average electronegativity because one atom has a very high electronegativity, whereas one has a very low electronegativity.
Remember that most bonds don't fall completely under a category, but are "mostly" one of these three. For example, polar bonds are in between ionic bonds and covalent bonds because the bonding is significantly uneven.