Subdivided plane's faces have inconsistent indexes. How can I order them sequentially?
Blender offers a way to sort mesh elements, which you can find in the Mesh menu. This is available as bpy.ops.mesh.sort_elements in python.

The obvious choice of sorting by view X Axis probably won't give you the result you expect at first. Sorting a grid by x axis values gives you multiple rows with the same x location, these tend to get sorted out of order. The trick is to rotate the mesh slightly, say 0.2, then sort the elements, and rotate by -0.2 to align it back again, this gets a nice predictable sorting. Note that the sorting is on the "View Axis", so you can also rotate the view slightly (easier in camera view) before sorting, only what is selected is sorted and the selection type also effects what is sorted, so if you are in vertex select then only the selected vertices are sorted, enable each selection type to sort all elements.