You have declared the input parameter
anArray
as being an array containing DateTime objects - but inside the loop you attempt to fill it with strings. You can't do that: that's like having a frame of round holes, and trying to fit square pegs into them!
To return strings, you must create a new collection that holds strings, and transfer the DateTime objects - as strings - into it.
The way I would do it - at least as a beginner - would be like this:
public static List<string> RetrunModifiedList(DateTime[] anArray)
{
List<string> results = new List<string>();
for (int i = 0; i < anArray.Length; i++)
{
results.Add(string.Format("Element {0} : {1}", i, anArray[i]));
}
return results;
}