The best and simplest way is to not do anything with textures but with data you are generating textures with, storing that data in a 2D array should save you some sanity.