cuda backend for indexing array using array