An Arduino sketch can't write into it's own FLASH/PROGMEM memory. Only the bootloader segment of FLASH can write into the application (sketch) segment of FLASH. Did you want to write a PC program to upload hex to an Arduino with a bootloader? Did you want to write an Arduino sketch to upload hex into another Arduino (with a bootloader? without a bootloader?)
The Arduino UNO Bootloader and the AVR In-system Serial Programming (ISP) interface both speak the STK500 (V1) protocol.
The sketch File->Examples->11.ArduinoISP->ArduinoISP will accept 'STK500 (V1)' messages from Serial and send 'SK500 (V1)' commands through the SPI interface to the target AVR hardware. It is used to write into FLASH/PROGMEM when an Arduino bootloader is not installed but the same commands over Serial would upload to an Arduino with a bootloader.