Is there a way to dynamically generate an array of a specific length without knowing its values in advance? For instance, if I need an array of 3 elements, it should be [-10, 0, 10], and for an array of 9 elements, it would look like [-40, -30, -20, -10, 0, 10, 20, 30, 40]. How can I achieve this automatically?