Powershell While Loop Array Python Methods