I made a pixel art program a while ago that included placing different colored pixels on the graph screen of my Ti-84 Plus CE, including zooming in and out, deleting pixels, and moving the image as a whole. I would like to improve its functionality, as it takes a long time to go through all of the lists (x, y, and color) to redraw the image (when zooming in and out), as well as when you have to delete a single pixel. Is there a way that I can find the index of a number that is in a list without going through all the elements of the list? For example, if I want to delete a pixel at (4, -6), can I only search the elements in the list that have an x value of 4 and a y value of -6 until I find the correct pixel to delete? (They have to have the same index, that's how my program identifies the x and y position of a single pixel. If they were rearranged, it would mess up the picture). If this is not possible, does anyone have any other ideas of how I can improve the program?
Find index of a list based on the value stored in it?