[stdlib] Removes redundant buffer zeroing in IndexPath initialiser by using `init(unsafeUninitializedCapacity:initializingWith:) (#31122)
[stdlib] Removes redundant buffer zeroing in IndexPath initialiser by using `init(unsafeUninitializedCapacity:initializingWith:) (#31122)

* Remove redundant buffer zeroing in IndexPath initializer

* Use switch instead of multibranch if

* Rename buf back into buffer to make diff clearer
apple/swift-corelibs-foundation,apple/swift-corelibs-foundation,apple/swift-corelibs-foundation,apple/swift-corelibs-foundation,apple/swift-corelibs-foundation