Let's focus on the watermelon seller.
Here we can compare an actual torture device, on display at the Black Museum, with a similar device depicted in the painting.
The painting appears to show a rather large ankle shackle--apparently large enough that he could have slipped his foot out--somehow attached under the knee of the watermelon seller. Yet, the device from the museum shows us that the top shackle would fit above the knee, with the lower shackle locked tightly around the ankle. Thus, a person locked it this device would not be able to bend his knee.
Our brother here is carrying a basket full of watermelons (stop to calculate the weight) with one leg hobbled. He's likely an escravo de ganho (earning slave), one of the three main categories of the enslaved in urban settings. In this system, the party designated as ‘master’ controlled the terms. In some cases, the enslaved person had to get a job, but the salary was paid to the ‘master’; in others, the party designated as ‘master’ demanded a set amount of money to be paid weekly. Initially, the party designated as ‘master’ had no legal obligations to the enslaved person, though later, laws were passed to require the ‘master’ to provide basic shelter; usually a straw mat on the floor in the basement of the ‘master's’ house.
This type of slavery was predominately a legal and economic system, as the enslaved person had be geographically "free", that is, the escravo de ganho had to be able to move freely about the city in order to meet the extortion demands of the ‘master’. Typically men, these 'earning slaves' literally built the city; they quarried the rocks, laid the paving stones; they worked in construction, transporation, and delivery of goods. And on top of all that, in order to survive, they had to have side hustles for food, clothing, and any basic necessities!
The escravo de ganho was instrumental in the Black and African communication networks. He was able to deliver messages, help organize rebellions and aid runaways. These men were also known to form freedom pools: a social group of friends and relatives who would sneak away bits of money into a collection that would be used to buy each other's freedom in turns.
This system of urban slavery allowed for poor Europeans, mostly Portuguese and later Italians, to journey to the New World with nothing but the rags on their backs. Upon arrival in Rio de Janeiro, they could scrape together enough to buy one escravo de ganho — even sometimes working side-by-side at a construction site, for example, to then collect 2 salaries. Then they would buy another, and then another, and quickly be able to establish themselves as the economically comfortable, fine families of Brazil.