Pass Command Line Arguments For Specific PIE Client

I’m currently trying to figure out how to pass some command line arguments to only some of the clients launched by the engine using the ‘Play In Editor’.

Here’s a link to the Unreal Engine’s source code:
https://github.com/EpicGames/UnrealEngine/blob/811c1ce579564fa92ecc22d9b70cbe9c8a8e4b9a/Engine/Source/Editor/UnrealEd/Private/PlayLevel.cpp#L2599

For example, I would like to be able to pass a custom command line argument to the first 4 clients that spawn, but not to the rest. (e.g. first 4 have --has_pet, but the rest of the clients don’t)

How would I go about doing that? (Assume that I can change the Unreal Engine’s code)

In PIE there is no command line argument, as the clients are only simulated and all launched from your editor.

But you are able to modify the game the way you want in the GameInstance by overriding UGameInstance::InitializeForPlayInEditor

How/where would you override UGameInstance::InitializeForPlayInEditor ?
Should one need to subclass UGameInstance and assign it to what, at which point?
Thank you