One way that a time cap or caps could be set is by legislation, as you mention; but judges don't write legislation. There is a way the rules develop as "common law" -- via judicial decisions -- but frequently that involves a process of gradual firming up through several cases that cover different situations. For example:
- There would be cases where a person's medications were confiscated; the courts would probably find that these need to be returned within a few days.
- There would be cases where a person's groceries were confiscated along with their car; perhaps the courts would find that the groceries don't have to be returned at all but rather their value replaced (it is hard to set a consistent timeline for groceries since crackers are good for weeks but ice cream in a car is good for maybe a few hours) whereas the car must be returned within a few weeks.
- And so on.
It generally isn't up to a court, faced with a specific case, to come up with a rule that covers a wide variety of dissimilar, if related, situations. Information for those situations is not generally covered in the case before them so it would be hard for them to make a good decision. They also aren't tasked to go get that information, since their job is to decide a particular as in an expeditious manner.
- There would be cases where a person's medications were confiscated; the courts would probably find that these need to be returned within a few days.
- There would be cases where a person's groceries were confiscated along with their car; perhaps the courts would find that the groceries don't have to be returned at all but rather their value replaced (it is hard to set a consistent timeline for groceries since crackers are good for weeks but ice cream in a car is good for maybe a few hours) whereas the car must be returned within a few weeks.
- And so on.
It generally isn't up to a court, faced with a specific case, to come up with a rule that covers a wide variety of dissimilar, if related, situations. Information for those situations is not generally covered in the case before them so it would be hard for them to make a good decision. They also aren't tasked to go get that information, since their job is to decide a particular as in an expeditious manner.