Fix a cache issue with transient ctypes values
Support partial array indexing