It's bad that kids may be fans of a certain team, but if they grow up to become professional players, they don't have a good chance to play for that team. It'd be better if the market tilted a bit, so players were a bit more likely to end up playing for a team they loved.
When they are young, players should officially declare the team they are a fan of. They should have to pick it early, maybe 12 or 13 years old. And they should have to justify the choice - it should be a team they have a reason to like. It could just be part of their high school basketball competition
If players play for their hometown team, the league would give a salary subsidy of 30%. So it would be a lot more likely that players would end up on their hometown team, but it wouldn't be definite.
Teams which had lots of fans would in general pay lower salaries.
Do players play worse when they are on their hometown team? If so, this would be bad.
Players would have one team they would cost less for, but could get paid more playing for.