How does a update.zip file update files
Well it's obviously not #2, updates would not work so well if they could not update existing items.

The script as a whole might do #1, but package_extract_* does #3.  You can see the code here: https://android.googlesource.com/platform/bootable/recovery/+/7d0542f28045640dfab6a259ae7bd796e653d66f/updater/install.c