a (probably) quicker way to fill array with values