Refactor and initial shareable indices changes.

These changes are dependent on successfully merging fhe-core.