Optimize withIndicies(), cleanup and unify forEachIndexed()