One way that you could implement this would be to use Social Teams.

A Social Team is a type of team in which every player within that team is considered a friend with the team's owner and as such is listed when you use getFriendIds(). When you want to add a player as a friend, you would just add them to the team using addMembers().