Add substr functionality to byte arrays