Refactor PosCar code to use numpy's array