I am making a program that shows cellular growth through an array. I have gotten it so when I press the start button, the array updates every 10 seconds in a while(true){} l
What you're looking for is multi-threading. Take the data processing and put it in a second thread, run it asynchronously, and use the main thread to check for user input.
Of course this might also entail using a semaphore to communicate between the two threads. What level class are you in - have you covered both of these topics already?