Get Array Index Powershell Script If Else