I think you misunderstood my question. I know you can't modify exiting blockchains, I'm just talking about 'template code" for a cryptocoin. I'm not trying to fabricate my own ledger or make a copy of transactional history from other coin, really just template code for a new coin. I'm leaning on just writing it from scratch but I thought if there was a go-to reference code for such things (probably bitcoin but maybe others are simpler) I could use that.
Almost any altcoin has its source code published. First of all you should set some basic details/features you want and then inspect some codes.
The most important should be the algorithm. Also there are different versions of code, I mean some coins are based on the newer version of Bitcoin code others on older version.