Speaking about Luke, you have to analyze his character evolution with the context surrounding his origin story in mind. He was made in the era where positive black role models were few and far between in mainstream media(kinda like how it is now) and blaxploitation was Hollywood's way of showcasing younger black men as main protagonists. Now that obviously accounts for his jive, but it also shaped him as a convict(wrongfully convicted of course) turned street -wise superhero fighting against crime and prejudice in all facets of his life. Now of course that rhetoric lost a lot of it's power over the years as blaxploitation died out, but his exploits as a black man fighting against institutional racism from the ground up were still rather prevalent. Hell his origin story brings to light the issues of mass black incarceration, a corrupt justice system and black disenfranchisement in a very epic way. Luke's character is far from transparent, and has stood for much more than just a simple caricature for aggressive black men.
Now as for how to write a black character, it depends entirely on what exactly you want this person to exemplify. Is he a younger black male struggling to find his balance in identity as a superhero and a black youth like Vergil Hawkins through profound internal monologue, or is he a stalwart advocate of black power who's views and ideals are juxtapositioned alongside other characters in thought provoking conversation like Sam Wilson? Is he supposed to convey a deeper rhetoric at all?
Was the reason that Blaxploitation movies were made was because Black people got there civil rights and decided to make movies of black people just being black? I like a lot of blaxploitation movies kinda nice knowing the history behind it being a black person