Create index from array

fixes #65