x = body.x[body_index]
I expect this should be much faster than accessing them like this:
x = body.[body_index].x
Because the latter requires pointer-from-property calculation for every single values access (which must be somehow optimised)
The former just requires pointer-from-property calculation for every array (not element) involved in the nbody loops, the individual element|values are picked out by array addressing which is inherently much simpler than property access.
I've used this method for nbody physics. I can modify a test to it and push to the repo.