Each of those collections gives access to bone types that have slightly different attributes, pose bones and edit bones being the most useful (the third seems to be Object-mode bones). You can only access armature.data.edit_bones in Edit mode. You should really try to come up with these algorithms yourself, it's the only…
Ok... I think I'm getting to where I want to be now. I have code, but it's only for testing, and is really messy. I'm going to try writing the full script for what I want to do now. Hopefully, it works out. I'm having a much easier time referencing things.
The cool thing is you don't need to actually reorder the mesh vertices, you only need to output the vertices as if they were ordered. You can "lie" whenever you need to write the index of a vertex, it can be whatever you want. - Traverse the PoseBone chain from the root bone to the leaf bone(s). - Use an incremental…