When Hegel expressed his observation, that consciousness of social forms as historical forms is often coincidental with their decline, with the aphorism "the owl of Minerva flies only at dusk", he had no way of knowing whether this principle might apply to Top Gun, Trading Places and Beverley Hills Cop.
I'm not sure if the popular background of neoliberalism is disappearing. In any case, the systematisation of pop neoliberalism probably won't speed its decline. But during the 80s and 90s a great mass of the Western professional class found it incredibly persuasive, to the extent that it was taken as nonpolitical modern thinking, rather than an ideology among others, and an ideology bound up with the entrenchment of capitalist dictatorship.
These ideas certainly influenced the cinema of that period, to the extent that a lot of 80s and 90s films hardly do anything more than preach pop neoliberalism.
For instance, if we look at Beverley Hills Cop, it seems that the writers of this film had a strong sense of the rottenness of excessive privilege and excessive bureaucracy, demonstrated by Beverley Hills and its ineficient police force. The environment this creates is unstable and malign, producing naïve and jobsworth cops, neo-feudal Eurotrash gangsters, and gay art lovers.
Capitalism as a whole isn't meant to be like this, it's a salutary lesson about the dangers of market failure. The real Beverley Hills is only pleasant at a superficial level; when viewed through the spectacles of pop neoliberalism, it is flabby and inefficient.
Anyway, just as estrangement from the market is seen to have a degrading effect on people, close contact with the market is seen to have an invigorating effect. So, the writers of Beverley Hills Cop seem to have had the idea that a streetwise person from outside their circle of privilege really ought to be able to play out his decadent contemporaries in Beverley Hills, purely on account of having "marinated" in an environment characterised by strong market imperatives.
Beverley Hills Cop would still work without having a black cop playing out decadent white Californians. The film could have had a streetwise Hispanic cop, or an Australian cop played by Paul Hogan. It wouldn't have worked with Eddie Murphy playing a cop who used to be a Trappist monk, or a professor of philosophy. At least it wouldn't have worked for a generation that voted for Reagan.