Put letters from input in array

Characters within a JS string can be individually read using the operator [] just like an array:

However if you prefer to convert it into an actual array you can invoke its String::split() function passing an empty string as its parameter:
const text = input.value();const chars = input.value().split('');

For “word” splitting instead of an array of characters take a look at both split() & splitTokens():

  1. reference | p5.js
  2. reference | p5.js