How to program an arduino without host pc & using arduino as handheld programmer

Or just a couple of LEDs to indicate status, and the SD card module.
Is a bootloader needed? Or just the sketch?
Creating a combined bootloader/sketch file for uploading was discussed in the forum quite recently.