It depends on whether it's Federal or state law. In Federal law, the only constitutional powers are the ones expressly granted. It has to be in the Constitution to be a power of the Federal government (and even then it's limited by many clauses).However, with the states it's a different matter. There, it is the way you say: they can do what they want unless they're restricted by the Constitution.