While it's true that metal and nonmetal atoms generally form ionic bonds, it is also possible for coordinate covalent bonds to be formed between metal and nonmetal atoms (usually when at least one of the atoms which are bonding are part of molecules). In coordinate covalent bonding one molecule usually has an atom with a lone pair of electrons (the electron pair donor or Lewis base) and the other atom is a metal ion that acts as the electron pair acceptor (Lewis acid). They key difference being that one atom is providing both electrons that are shared in the coordinate covalent bond, whereas in an ionic bond there's a complete transfer of electrons as opposed to sharing,