Would it be possible to connect the ICSP pins of an Uno to the respctive MOSI, MISO, SCK and RESET pins on a standalone Atmel328P in TQFP32/MLF32 and upload the boot-loader ?
No. The ICSP “Reset” pin is not the same as Pin 10 which is the pin the ArduinoISP sketch uses for SlaveSelect.
In other words: ICSP pins 1, 2, 3, 4, and 6 connect directly and the target’s ICSP5 (/RESET) connects to digital pin 10 on the ISP Arduino.
Seoncondly why is a DIP pacakge different from TQFP32 or MLF32 in terms of pins. The dip has 28 and TQFP has 32. I am hoping to replace the DIP with the SMD pakcage. Did i use the wrong package ?
You can’t unplug a DIP28 ATmega328P and plug in a TQFP32 and MLF32 ATmega328P. The pins are in very different positions, along four edges of a square and spaced closer together.