0

Python 3, 278 bytes
I should really golf this down better, but here is my solution, with thanks to katenkyo for their help with the logic.
def m(s):
l=len(s);p=[[i,s[i]]for i in range(l)]
for i in range(l):
c=s[i]
if c.isalpha():
a=p[i][0];m=(a+ord(c)%32)%l;p[i][0]=m
for j in range(...