Joining two Featuresets in Arcade is frickly. You have to manually create a new featureset, iterate through the input fs, Filter() the corresponding Feature from the join fs, and copy all attributes from both Featuresets.
This is not only a lot of code for a simple operation, but using Filter() in a loop massively impacts performance, so either you write even more code to load the Featuresets into RAM (until it is hopefully added into native Arcade functionality) or your expression is really slow.
Joining Featuresets is one of the most basic database/GIS operations and really should be a native function.
Especially now, as Arcade gains popularity. I answered multiple questions about joining fields in the last weeks. The current way to do it is absolutely not suited for new or inexperience users. And lacking such basic functionality really isn't a great look for a language focused on data manipulation.
I envision something like this:
var in_fs = FeaturesetByPortalItem(...)
var join_fs = FeaturesetByPortalItem(...)
# option 1: single field key, join all fields
var joined_fs = Join(in_fs, "PrimaryKey", join_fs, "ForeignKey")
# option 2: multiple fields key, select fields to join
var joined_fs = Join(in_fs, ["PrimaryKey1", "PrimaryKey2"], join_fs, ["ForeignKey1", "ForeignKey2"], ["JoinField1", "JoinField2", "JoinField3"])
So the signature would be something like this
Join(inFS, primaryKeys, joinFS, foreignKeys, joinFields=["*"])