var arr = ["i", "n", "c", "e", "p", "t", "i", "o", "n"]

var text = " " * arr.size()

The last line above gives error. What can I replace it with?

This is probably not the best way, nor the most performant, but you can use a quick for loop to create a string with a known size/length:

func create_string_with_length(var length, var character_to_use = " "):
	var ret_val = ""		
	for i in range(0, length):
		ret_val += character_to_use
	return ret_val
func _ready():

	for i in range(arr.size()):

		text += " "

Used this method.

3 years later