In a large bowl put in beans, add 4 cups of water, and a chunk of onion. Allow to sit for an hour, than rinse. (Keep the onion.)
To the instant pot, add in oil to the center of the sleeve. Set the saute function for 5 minutes. Once oil has been heated, add in seasonings, tomato paste, and sofrito. Cook for 2 minutes. Then add in ham, garlic, and beans. Mix together. Add in 8 cups of broth or water.
One saute is over, press high pressure for 40 minutes. Once timer is done, press cancel and allow a natural release until depressurized.