The problem is that al c is not used for anything, this is not passing by reference.
I would do so, for beginners:
mystring = "hello world"
toUpper = ['a', 'e', 'i', 'o', 'u', 'y']
array = []
for c in mystring:
if c in toUpper:
c = c.upper()
array.append(c)
print(''.join(array))