Das ist der ideale Fall für offene Arrayparameter

Delphi-Quellcode:
funtion Check(arr: array of integer): boolean;
var x, y: intger;
begin
Result := false;
for x := 0 to high(arr) - 1 do
for y := x + 1 to high(arr) do
if arr[x] = arr[y] then exit;
Result := true;
end;
Check([i1, i2, i3, i4, i5]);