how can i store an array of multiple types
You should initialize an array with some dummy values of the types you want to use. Then you can empty the array and makecode will recognise it as an array of those types. Then you can add any of those types to the array. Here’s a demo