Hmmm, I think I did it(although I am sure there is a more elegant way).
First I used
CForm[expresion] /. Power -> pow
and the I used the output as a string and I used:
StringReplace["output",{"y0" -> "y[0]", "y1" -> "y[1]", "y2" -> "y[2]", "y3" -> "y[3]"}]