Revert "convert neighbors to flat array"

This reverts commit 3968511f18a864077ee5b7f58d796249f6dbfeea.
Revert "flatten out cpu_box"

This reverts commit ae80372231465e8b9b4e5dc1c26d250b7f4473a5.