Suppose I want to replace the nth letter of some string, how can I do that?

I tried something like this but it's not correct:

```
#!/bin/bash
index= # let say 2
s='Hello'
echo ${s/$index/'a'} # This should print Healo

```