Update tpu_util.py
Please don't use "add file"/"update file"/"fix file"/etc. commit messages. These are hard to reason about when looking at the history of the file/repository. Instead, please write explanatory git commit messages.

The commit message is also the title of the PR if the PR has only one commit. It is thus twice important to have commit messages that are relevant, as PRs would be easier to understand and easier to analyze in search results.

For how to write good quality git commit messages, please consult https://cbea.ms/git-commit/ 

We will automaticall close PRs by you if you don't take these suggestions into account
This commit refactors the code for calculating mesh_shape and device_coordinates for the topology. The changes include:

- Convert core_locations into a NumPy array for improved performance.
- Calculate minimum and maximum values for x, y, z, and core using NumPy functions.
- Reshape device_coordinates efficiently using NumPy.