This commit refactors Ivy runtime code to move `readPatchedData` and `attachPatchedData` functions to a single location for better maintainability and to make it easier to do further changes if needed. The `readPatchedLView` function was also moved to the same location (since it's a layer on top of the `readPatchedData` function). PR Close #41097