Python Loop Over Array With Index