Depends on the language. Doing that is a huge pain in Go (until fairly recently, and it's still quite abnormal or closure-heavy), so the vast majority of code there does manual index-pairing instead of e.g. a zip iterator when going through two paired arrays.