Is it possible to custom program AVR by putting it in the AVR socket of an Arduino?
Yes. You can program a virgin AVR by connecting it up to some GPIOs and reflashing it. If you had a second Arduino, the chip being programmed would sit in the socket.

http://arduino.cc/en/Tutorial/ArduinoISP

(With the Arduino Uno, it's more complex it seems)

Can you use an Arduino Uno as an ATMega328 Programmer?

How to burn atmega328 chip via Arduino UNO as ISP?