Q:

Int64 for enumerated loops

If I use array.enumerated I can loop over int indices. But
for (intIndex, actionElement) in actionElements.enumerated()
But what if I want to use Int64 instead of Int?
What is the best syntax of that?
BTW, currently, I simply use this: let index = Int64(intIndex)

A:

Map the types to what you want them to be:
for (index, actionElement) in actionElements.enumerated().map({(Int64($0), $1)}) { ... }

You say you want indices, however. enumerated doesn't return indices. It returns offsets. For an Array, those happen to be the same, but this isn't universally true, and it's easy to have this turn into a bug if you do something like add dropFirst(). If you really want indices, you can zip them the same way:
for (index, actionElement) in zip(actionElements.indices.map(Int64.init), actionElements) { ... }

In both of these cases, the syntax gets a bit long, so I'd break it up into a separate variable, or create a helper function, but in any case the solution is going to be to map all the values, or to convert them when you use them (as you're currently doing).

