Custom Struct == Operator with Array.Find

I know this is a very old post, but maybe someone is still interested in a solution for the original question. I recently come across this issue myself and found a solution.

USTRUCT(BlueprintType)
struct MY_API FMyStruct
{
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	int32 PropertyField;
	
	uint16 Field;
	
	bool operator==(const FMyStruct& Other) const;
	{
		return PropertyField == Other.PropertyField && Field == Field;
	}
};

/**
 * These traits basically tell the system which functions are actually implemented in the struct that can be
 * automatically called by Unreal. Each enum entry stands for at least one function or constructor
 * that is implemented by the struct with the correct signature
 * (e.g 'WithSerializer = true' -> 'bool Serialize(FArchive& Ar)').
 * See 'TCppStructOps' in 'Class.h' for a full list of traits and functions.
 */
template <>
struct TStructOpsTypeTraits<FMyStruct> : TStructOpsTypeTraitsBase2<FMyStruct>
{
	enum
	{
		// Uses the 'operator==' when comparing the struct when using reflection. 
		WithIdenticalViaEquality = true,
	};
};

If can confirm that the custom equality operator is indeed getting called by using an Array.Find node in blueprints.

Note that the default implemention seems to compare all UProperties of the struct. So this is only needed if you have other members of your struct that are not flagged with UPROPERTY or just want to compare a subset of members of your struct. See Class.cpp: UScriptStruct::CompareScriptStruct() for reference.