PIC's from the manufacturer do not have individual serial numbers/unique codes on each chip. The chip carries an ID that the programmer can check to be sure it is the correct device as specified in the configuration settings. For example, if the Microchip programmer detects a 16F1829 and the settings are for a 16F1519, the programmer will give an error.
Here is a more extended discussion of such identifications:
https://electronics.stackexchange.com/questions/21447/is-there-a-built-in-serial-number-in-pic-chip
Although only strictly applicable to PIC's, the comments about serialization during manufacturing of the MCU may apply to other manufacturers. Also, EEPROM's may be different than MCU's in that regard.
John