Can the new 2013 27" iMac function like the Thunderbolt Display?

For the display, yes:

Target Display Mode. In this mode your iMac can serve as a display for another Mac. This is supported via the Thunderbolt port using a Thunderbolt to Thunderbolt cable (not supported via a Mini DisplayPort cable)

source: http://support.apple.com/kb/HT5522

For the rest of the devices, theoretically not:

7. When I have a Mac connected via the Apple Thunderbolt to Thunderbolt cable (2.0m) via Target Disk Mode or Target Display Mode, do devices connected to that Mac become active on my computer?

No. The additional devices will become peripherals for the Mac in Target Disk Mode or Target Display Mode. The additional devices do not "chain" through the Mac and its other Thunderbolt port.

source: http://support.apple.com/kb/HT5219#target

Hope this helps (wouldn't it be neat?)