Yes, most Basics had peek and poke commands with which you could read and write specific memory locations. For example - parentheses may or may net be needed, depending on the Basic implementation:
X = PEEK( 123 )
would read the byte at memory location 123 and store its value in X. Then POKE( 123, 42 )
would change the byte at 123 to be 42.But these didn't normally have so much to do with patching executables to add/change functionality.