Use 
```go
for i, val := range myArray {
    // Do something with with i or val
}
```