Why is it that strlen returns the number of chars currently in the string, and not the actual declared size of the array?

When I first started using strlen, I loved this feature, since when used to control a loop it avoids useless iteration. Now I want something that will tell me the declared size of the array, regardless of how many chars are currently in it...

And since I'm on the subject, how might one dinamically allocate a string of certain size? I know that you cannot place a variable in the [array_size] area, only a straight number else a #defined real number. So how?