LONGCOLL sample of code:
procedure TForm1.SomeStuff ( S: TDStream );

procedure Action ( P: TMyClass ); far;
begin
// do something with P.Fields
end;

function CheckItem ( P: TMyClass ): Boolean; far;
begin
// do something with P.Fields
Result := True;
end;

var
C: TMyClass;
begin
// perform Action on all items
MyCollection.ForEach ( @Action );

// search first Item which checks some condition
C := MyCollection.FirstEach ( @CheckItem );

// save found item to stream
if Assigned ( C ) then
C.Store(S);
end;