Generally speaking, Congress does enact uniform federal laws, and there may be some constitutional boundaries and limitations on enacting local laws (as noted below with respect to bankruptcy court costs). But there isn't a hard and fast rule permitting federal law to be different in different states or on some other geographic basis. The United States Congress has some authority to pass "local" laws.
For example, the extent to which mineral rights belong to the federal government or are reserved to private landowners differs in different parts of the United States. Similarly, the circumstances under which easements can arise over federal property are not uniform, and homesteading acts have always been limited to particular parts of the country.
The United States can and does enact different environmental laws governing oil extraction in the Gulf of Mexico than it does in Alaska. There are different federal air pollution laws relating to motor vehicle emissions that apply in California and some Northeastern U.S. states than in the rest of the country.
Federal alcohol regulation applies different labelling laws to whisky based upon whether or not a certain portion of the product is distilled in Kentucky, even if whisky distilled in, say, Ohio, is chemically indistinguishable. The constitutional amendment ending prohibition is an "anti-uniformity" statute and specifically provides that the states may regulate alcohol differently at the state level.
The United States can and does enact different regulations for national parks in Florida than it does in Wyoming.
Postal system regulations can and do single out Hawaii and Alaska for special treatment.
Federal law concerning Indian tribes is very piecemeal with different tribes and different reservations governing by different laws.
Eligibility for the joint state-federal Medicaid program differs with some states accepting Obamacare subsidies to expand eligibility, and other states declining to do so. States can differ in having or not having health insurance exchanges under the Affordable Care Act, and subsidies for non-employer health insurance under the Affordable Care Act likewise differ from state to state.
One of the paradoxical areas is bankruptcy law.
The Constitution states that federal bankruptcy laws must be "uniform" and in the area of the court costs charged to parties, a pilot project to have a different fee structure in different court districts was held to be unconstitutional on that ground.
Yet, the assets that someone filing for bankruptcy may retain free of creditor's claims is allowed to (at the election of each U.S. state) and in practice, almost always does, track the same exemptions from creditors that exist in that state outside of bankruptcy proceedings. So, for example, there are basically fifty different sets of rules among the fifty U.S. states regarding when home equity can be exempt from creditor's claims (subject to some limitations in certain cases that set a uniform cap on such protections, for example, for home equity that a debtor wants to shield from securities fraud claims).
There are also assimilative statutes that adopt by reference the criminal laws of a state where certain federal property is located as federal crimes. And, there are also laws that apply only in areas subject to U.S. jurisdiction which are outside any U.S. state.
There are a number of U.S. tax laws that apply only in specific geographic areas, such as special tax treatment for Puerto Rico, and Opportunity Zones. Similarly, there are differences in how certain income tax and estate tax provisions apply in community property states from how those provisions apply in separate property states.
The most famous example is probably the Voting Rights Act which for many decades applied more strict federal regulation of election administration on states with a history of discrimination in election laws than those that did not. Eventually, this provision was struck down by the U.S. Supreme Court. But the U.S. Supreme Court did not hold that the disparate treatment of states under the Voting Rights Act was initially illegal. Instead, it held that the basis for treating those states (and localities) differently had grown stale (in a controversial opinion) and no longer justified this treatment.
Would it pass constitutional muster for the U.S. code to enact de jure
laws that have these de facto effects, i.e. a law that says in Texas
police have this power and in Florida they do not, etc.?
I could imagine that a law justified by the enforcement clause of the 14th Amendment could be used in connection with Congressional findings in order to, for example, prohibit police in states with a history of discrimination against Hispanics or other populations with a high proportion of immigrants from requiring people to present ID in stops short of an arrest (so called Terry stops), while not imposing that requirement on states without a history of that kind of conduct, which would be upheld as constitutional.