I realise, this is about 10 days late, but have you sorted it?
Your custom function seems to be reuring an array 5 rows by 4 columns, but only the first row is populated by the UDF. We'd need to see the UDF and ask you if that's the intention or does the UDF need tweking to produce only a 1 row by 4 column array rather than a 5 by 4 array.
But even without alteration to the UDF you could populate the array destined for the sheet in a different way.
But there's something I don't understand, you create an array for the results (Dim Results(4 To 30, 1 To 2)) which initially seems tobe a 27 row by 2 column array,but when written to the sheet you transpose it, implying a destination range of 27 columns by 2 rows, but your destination range (AY2:BB32) is 4 columns wide by 31 rows deep.
Now this next is a guess, but how about something along the lines of:
Dim Results(4 To 30, 1 To 5) As Variant
For i = 4 To Z 'for each column of data/series
Sheets("calculation").Range("U14:U" & lastrow).Value = Sheets("Dataraw").Range(Cells(1, i), Cells(lastrow, i)).Value
Results(i, 1) = Sheets("calculation").Range("U14").Value
For j = 2 To 5
Results(i, j) = customfunction(x)(1, j - 1)
Next j
Next i
(untested) which is meant to produce a 27 row by 5 column array which I'm guessing is the sort of size array you're wanting to put on the sheet. It can be made more efficient (it calls the custom function 4 times when it need only be called once, but this can be tweaked later if I'm on the right track).