Consider this example: I am working with a string array
const groceries = [
'milk',
'coriander',
'cucumber',
'eggplant',
'carrot',
'brinjal',
'onions',
'tomatoes',
'soap',
'bag',
'pepper',
'salt',
'fruits',
'bread',
'pasta',
'oil',
'butter',
'honey',
'sugar'
];
The task at hand is to select three random elements from the grocery list above, ensuring no repetition and including their respective indexes.