I have tried using some of the existing 3rd party API's but those are either too close or expensive or both, so was thinking about creating something myself locally.
I'm not sure what do you mean by "too close" but there are a lot of APIs that provide that functionality for free (Blockchair, Blockonomics, BTC.com, etc.). Which APIs have you tried so far?
I think I am looking for something similar to this, but possible even more low level, so I can create my own website. As in, is it possible to extract all public keys and balances from each block and then save that data in a custom database? And is that how websites like blockchain.info do it?