Summarizing answers here and elsewhere:
Both are widely used as the plural of index in English. The Latinate indices is more prevalent in scientific and mathematical contexts, as in the (subscripted) indices of array in a formula. But indexes appears to be on the rise, relatively stronger in publishing ('periodical indexes') and American English.
Some see a value in using indices uniquely for the plural of the noun index, as opposed to the 3rd-person singular present tense indexes of the verb index. ("He indexes all the TPS reports, you can find those indices in the circular file.")
Some perceive a small shading of difference between simple numerical-offset array indices and the more sophisticated data structures of database indexes or full-text indexes. ("The indexes were corrupted because the update code has an off-by-one error in its indices.")
These distinctions are sufficiently subtle that they're likely only maintainable within a tight-knit community of practice which documents & enforces their preferences, as if in some local & authoritative style guide.
Specifically when naming variables in code:
Using indexes
has the often-desirable property that a simple grep search for index
will also find that pluralization. When looking for indirect ways in which the same offsets might be referenced, that can be helpful.
target_index = 0
indexes[target] = 0
indexes['target'] = 0
target = len(indexes)
indices
doesn't have this property, so I prefer to use indexes
in code.